ajax
$.ajax({
type: "GET",
url: "url.html",
data: {"key":"value",.....},
dataType: "json",
success: function(data){},
error : function(){}
});
POST
$.post(url,data, function(msg) {
//msg返回值,可以为json或者字符串
});
GET
$.get(url,data, function(msg) {
//msg返回值,可以为json或者字符串
});
网友评论