$.post
$.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");

浙公网安备 33010602011771号