ThinkPHP handles the method returned by Ajax, thinkphpajax returns
The example in this article describes ThinkPHP’s method of processing Ajax returns and is shared with everyone for your reference. The specific implementation method is as follows:
You can directly use ajax to return in ThinkPHP:
Copy code The code is as follows:
$.post(handleUrl,{username:username.val(),content:content.val()}, function(data) {
//Here is the content returned from receiving. },'json');
You can use this function during processing:
Copy code The code is as follows:
$this->ajaxReturn(content to be returned,'json(json format return)');
I hope this article will be helpful to everyone’s ThinkPHP framework programming.
http://www.bkjia.com/PHPjc/916067.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/916067.htmlTechArticleThinkPHP's method of processing Ajax returns, thinkphpajax returns This article describes the ThinkPHP method of processing Ajax returns, and shares it with everyone. For everyone’s reference. The specific implementation method is as follows: In Thin...