可以使用jQuery的$.ajax()方法,设置type参数为POST,并通过data参数传递需要发送的数据。示例代码如下:
$.ajax({ type: "POST", url: "your_url_here", data: { name: "John", location: "Boston" } }).done(function( msg ) { alert( "Data Saved: " + msg ); });
上一篇:Ajax调用未能更新列表,除非另一个调用被触发。
下一篇:Ajax调用未执行,抛出未定义错误。