xmlHttp ie6下不跨域还提示没有权限,ie8下不会有这

网络编程 2021-07-05 12:59www.168986.cn编程入门
昨天晚上叫我好弄啊,最后发现原因是我url太长了,最后发现URL在2070B左右就不行了
url太长就会提示没有权限,ie8不会,这应该跟浏览器有关的
其实有个问题你注意一下就是,改成POST 方式传就解决了
this.xmlHttp.open("POST", this.url, true);
//alert('end');

this.xmlHttp.setrequestheader("content-length",this._data.length);
this.xmlHttp.setrequestheader("content-type","application/x-www-form-urlencoded");
this.xmlHttp.onreadystatechange = Page;
this.xmlHttp.send(this._data);

by webxeyes 网络推广网站推广转载注明出处 http://blog.csdn.net/webxeyes

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by

长沙网络推广|微博营销|长沙seo优化|视频营销|长沙网络营销|微信营销|长沙网站建设|口碑营销|软文营销