xml| Resolution | request | site users after the latest patch of IE, ie default configuration, the use of XMLHttp will not be able to access across the site, such as the http://community.csdn.net/page can not access http:// message.csdn.net/the page. The following error will be reported:
---------------------------
Error
---------------------------
A run time error occurred.
Do you want to debug?
One way to fix this:
Principle, use the following way to invoke a script that is available across a Web site:
<script id=message language=javascript src= "******************" ></script>
As a then, we can implement a cross-site scripting call in the following code format. In turn, the implementation of XMLHttp can not be called across the site.
var Url = "http://message.csdn.net/********":
var scriptname = "Checkuserhasnewmessage";
var head= document.getelementsbytagname ("Head"). Item (0);
var old = document.getElementById (scriptname);
if (old) head.removechild (old);
This script requires the callee to return the JS script. You can write some functions in advance of the caller and then call back the calls of those functions.
The above methods in the previous version of IE, FireFox default settings are no problem.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.