$.ajax({
url : "/",
//传输类型为post
type: "POST",
//需要使用JSON序列化参数
data: JSON.stringify([
{id: 1, name: "Shahed"},
{id: 2, name: "Hossain"}
]),
//类型设置为以下
contentType: "application/json; charset=utf-8",
//数据类型为json
dataType : "json",
success : function(){
console.log("Pure jQuery Pure JS object");
}
});
【JQUERY】通过request body 提交数据
最新推荐文章于 2023-06-13 08:43:23 发布