jquery設(shè)置context?
jquery ajax contentType設(shè)置
默認(rèn)get方法沒(méi)有contentType,post方法的contentType為:application/x-www-form-urlencoded; charset=UTF-8
$.ajax({
type: 'post',
url:'/contentType',
contentType:'application/x-www-form-urlencoded',
data:{
username:'admin',
password:'123123'
},
dataType:'json',
success:function (data) {
}
})