返回值:XMLHttpRequestjQuery.post(url, [data], [callback], [type])

概述

通过远程 HTTP POST 请求载入信息。

这是一个简单的 POST 请求功能以取代复杂 $.ajax 。请求成功时可调用回调函数。如果需要在出错时执行函数,请使用 $.ajax。

参数

urlString

发送请求地址。

data (可选)Map

待发送 Key/value 参数。

callback (可选)Function

发送成功时回调函数。

type (可选)String

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