ajax使用

Posted 覃上

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ajax使用相关的知识,希望对你有一定的参考价值。

$.ajax({
method:‘POST‘,
url:‘/midservice/studentAction/addStudent‘,
data:$.toJSON(userDate),
async:false,
cache : false,
dataType:"json",
crossDomain : true, //跨域问题
contentType: "application/json; charset=utf-8",//请求需要发送的处理数据 编码格式
success:function(data){

},
error:function(){

},
});

以上是关于ajax使用的主要内容,如果未能解决你的问题,请参考以下文章