ajax 发送请求到servlet,servlet响应之后,responseText 取不到值。

  使用chrome 浏览器本地调试JS ,ajax 发送请求到servlet,servlet响应之后,responseText 取不到值。

使用F12调试发现问题: 

XMLHttpRequest cannot load file:///D:/file.html. Origin null is not allowed by Access-Control-Allow-Origin

http://www.ghugo.com/origin-null-is-not-allowed-by-access-control-allow-origin/

 

在chrome 的快捷方式加目标后缀加 --disable-web-security

posted on 2013-11-25 12:08  L'nemo  阅读(491)  评论(0)    收藏  举报

导航