日期:2014-05-16  浏览次数:20364 次

chrome下跨域访问淘宝的问题。。。
是在chrome扩展程序里用,我在manifest.json中添加了
"permissions": [ "tabs", "http://*/", "https://*/" ]
按文档的意思,这样就应该允许跨域访问了

代码是这样
            xmlHttp = new XMLHttpRequest();
            xmlHttp.open("get", "http://taobao.com", false);
            xmlHttp.send();
            var result=xmlHttp.responseText;

上面的代码总提示a network error occurred,
但我把 taobao.com改成 baidu.com完全没有问题,上面的提示是为什么呢。。。正确的写法是怎么样的?

------解决方案--------------------
楼主可以等淘宝看看  它的首页上  是不是对top.location等 做了限制