jquery ajax post 请求模板代码,如下:
$.ajax({
type: "GET",
url: "test.json",
data: {username:$("#username").val(), content:$("#content").val()},
dataType: "json",
success: function(data){
},
error: function(data){
}
});