Differences between Ajax and post processing JSON in jquery

From , 5 Years ago, written in JavaScript, viewed 164 times.
URL https://pastebin.vip/view/1bd2caf9
  1. function haha() {  
  2.     jQuery.post("addComment!comment.action",  
  3.      function aa(data) {  
  4.           data = eval(data);//POST方法必加,ajax方法自动处理了  
  5.           alert(data[0].userId);  
  6.           alert(data[0].userName);  
  7.     },  
  8.     "json"  
  9.     );  
  10.      
  11.     jQuery.ajax({  
  12.         type:"post",  
  13.         url:"addComment!comment.action",  
  14.         dataType:"json",  
  15.         success: function aa(data) {  
  16.               alert(data[0].userId);  
  17.               alert(data[0].userName);  
  18.         }  
  19.     });  
  20. }  
  21.  
  22.  
  23.  
  24. //javascript/7012

Reply to "Differences between Ajax and post processing JSON in jquery"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website