Jos*_*eph 0 ajax jquery post json
我可以使用$ .post()获取返回json字符串解析,但不能获得$ .ajax().
{"result": "success", "id": "1"}
Run Code Online (Sandbox Code Playgroud)
帖子的实际代码没有:
post: function( url, data, callback, type ) {
// shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
data = {};
}
return jQuery.ajax({
type: "POST",
url: url,
data: data,
success: callback,
dataType: type
});
},
Run Code Online (Sandbox Code Playgroud)
正如文档所说,它只是$ .ajax的简写
| 归档时间: |
|
| 查看次数: |
2251 次 |
| 最近记录: |