sunkiha
sunkiha
  • 发布:2015-10-31 14:04
  • 更新:2015-10-31 14:04
  • 阅读:1462

关于ajax 不能跨域Access-Control-Allow-Origin等问题的解决方法

分类:MUI

let's see mui.js sourses:
var jsonType = 'application/json';
accepts: {
script: 'text/javascript, application/javascript, application/x-javascript',
json: jsonType,
xml: 'application/xml, text/xml',
html: htmlType,
text: 'text/plain'
},
说明发起请求只接受appplication/json 但有些服务器并不理会 java服务器没问题,php经常会有问题
解决方法
改成 var jsonType = 'application/json;charset=utf-8,text/json;charset=utf-8';
finish....

2015-10-31 14:04 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复