xml=new ActiveXObject("Microsoft.XMLHTTP");
xml.open("GET","http://xxx/test.asp",false);
xml.send();
用firbug调试的时候这句直接跳过了为什么?
回复讨论(解决方案)
firbug ?firefox下要用 xml=new XMLHttpRequest();
if(window.XMLHttpRequest){ xml=new ActiveXObject("Microsoft.XMLHTTP");}else{ xml=new XMLHttpRequest();}xml.open("GET","http://xxx/test.asp",false);xml.send();
firbug ?firefox下要用 xml=new XMLHttpRequest();
if(window.XMLHttpRequest){ xml=new ActiveXObject("Microsoft.XMLHTTP");}else{ xml=new XMLHttpRequest();}xml.open("GET","http://xxx/test.asp",false);xml.send();
这个对了,send怎么又出错了?
function GetLocalIPAdress(){ if(window.ActiveXObject) { xml=new ActiveXObject("Microsoft.XMLHTTP"); }else { xml=new XMLHttpRequest(); } xml.open("GET","http://iframe.ip138测试数据/ic.asp",false); xml.send(null); kk=xml.ResponseText; alert(kk); i=kk.indexOf("["); ie=kk.indexOf("]"); ip=kk.substring(i+1,ie); alert(ip); return ip;}
iframe.ip138测试数据不是你的域,不能跨域的
iframe.ip138测试数据不是你的域,不能跨域的
那我怎么能请求这个ip地址呢?
iframe.ip138测试数据不是你的域,不能跨域的
那我怎么能请求这个ip地址呢?
function getIp(){ $.getScript( 'http://pv.sohu测试数据/cityjson' ,function(){ alert( returnCitySN.cip +':' + returnCitySN.cname ) } ) } getIp();
查看更多关于xml=newActiveXObject("Microsoft.XMLHTTP")出错_html/c的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did103199