禁止访问非同域的网站,下面一个例子来访问http://www.google.cn, [removed] function createobj() { if (window.ActiveXObject) { return new ActiveXObject(“Microsoft.XMLHTTP”); } else if (window.XMLHttpRequest) { return new XMLHttpRequest(); } } function getWebPage(url) { var oBao=createobj(); var my_url