ajax post上传数据时,前端出现的跨域权限问题:ccess to XMLHttpRequest at ‘’rom origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok st
本人前端使用多个框架时,jq ajax传参出现如下报错:
最后发现,可能是xhr的相关默认参数被修改了。顾使用jq 传参时,一直报错,jq ajax额外添加的关键参数:
crossDomain: true
ajax post传参完整如下:
$.ajax({ url: IPName + '/api/index/appointment', type: 'post', dataType: "json", data: { mobile: psi_mobile }, crossDomain: true, async: "false", success: function (info) { } })
顺利解当前问题,
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/autoXingJY/p/11419860.html
如果觉得文章对你有用, 请帮忙点个推荐和收藏 ! Thanks♪(・ω・)ノ