jquery代码:
alert($("form").serialize());
- 1
完整请求:
这个方法适用于get请求,对于post请求我没试过。
$("#generate").click(function(){
$.ajax({
url:"organization/generateAuthCode", //你的路由地址
type:"post",
dataType:"json",
data:$("form").serialize(),,
timeout:30000,
success:function(data){
$("#description").value(data);
},
error:function(){
console.log(data);
}
});
});
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
我在后端返回接收到的数据:
get也是可以的:
<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/markdown_views-ea0013b516.css">
</div>
jquery代码:
alert($("form").serialize());
- 1
完整请求:
这个方法适用于get请求,对于post请求我没试过。
$("#generate").click(function(){
$.ajax({
url:"organization/generateAuthCode", //你的路由地址
type:"post",
dataType:"json",
data:$("form").serialize(),,
timeout:30000,
success:function(data){
$("#description").value(data);
},
error:function(){
console.log(data);
}
});
});
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
我在后端返回接收到的数据:
get也是可以的:
<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/markdown_views-ea0013b516.css">
</div>