您的位置:首页 > 其它

$.post

2015-07-29 17:42 204 查看
$.post

url:发送请求地址。

data:待发送 Key/value 参数。

callback:发送成功时回调函数。

type:返回内容格式,xml, html, script, json, text, _default。

$.post(
"test.php",
{ "func": "getNameAndTime" },
function(data){
alert(data.name); // John
console.log(data.time); //  2pm
},
"json"
);


$.post("test.php", { name: "John", time: "2pm" },
function(data){
process(data);
}, "xml");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: