View
$ (document). Ready (function() { varSs= "ASDFF"; $(". Check"). Click (function() {alert ("OK"); $.ajax ({type:' Get ', URL:' <?php echo url::base (true)? >purchasepay/finance/purchasepay/payaction ', Async:false, Data:{pro:ss,needpay:ss}, Success:function(data) {alert (data); }, Error:function() {alert ("Error"); } }); }); });
Controller
$s=$_get["Pro"]; Echo $s );
$.each ()
$. each function (Commentindex, comment) { + = ' <div class= "comment" >] + ': ] + ' </p></div> '; });
The $.each () function differs from the each () method of the JQuery object, which is a global function that does not manipulate the jquery object, but instead takes an array or an object as the 1th parameter with a callback function as the 2nd argument. The callback function has two parameters: the 1th is the index of the object's member or array, and the 2nd is the corresponding variable or content.