First, Ajax requests data (using Jquery Ajax) [javascript] & lt; script & gt; $ (function () {$ (& amp; 39; test & amp; 39;) click (function () {$ ajax ({url: & amp; 39 ;__ APP _ Articlejs first, Ajax request data, (Jquery Ajax is used) [javascript] script $ (function () {$ ('# test '). click (function () {$. ajax ({url: '_ APP _/Article/jsontest', type: 'post', success: function (data) {var item; $. each (data, function (I, result) {item =""+ Result ['num'] +""+ Result ['title'] +""+ Result ['credate'] +"Operation"; $ ('. Table '). append (item) ;}}})}); the script background processes the request and returns the Json format data (Thinkphp returns the data) [php] $ list = $ File-> group ('num')-> order ('Id desc ')-> limit ($ Page-> firstRow. ','. $ Page-> listRows)-> select (); $ this-> ajaxReturn ($ list, 'json'); html part [html]
No. |
Name |
Creation Time |
Operation |
Effect