1 function methodName() { 2 var params = { 3 4 }; 5 var url = ‘‘; 6 jQuery.ajax({ 7 type: ‘POST‘, 8 contentType: ‘application/x-www-form-urlencoded‘, 9 url: url, 10 data: params, 11 dataType: ‘json‘, 12 success: function (data) { 13 14 alert("成功啦"); 15 }, 16 error: function (data) { 17 alert("失败啦"); 18 } 19 }); 20 }
原文地址:https://www.cnblogs.com/dw3306/p/9178235.html
时间: 2024-12-31 18:22:15