科技知识动态:xml=new ActiveXObject("Microsoft.XMLHTTP")出错_html/css_WEB-ITnose

导读 跟大家讲解下有关xml=new ActiveXObject("Microsoft XMLHTTP")出错_html css_WEB-ITnose,相信小伙伴们对这个话题应该也很关注吧,现在就

跟大家讲解下有关xml=new ActiveXObject("Microsoft.XMLHTTP")出错_html/css_WEB-ITnose,相信小伙伴们对这个话题应该也很关注吧,现在就为小伙伴们说说xml=new ActiveXObject("Microsoft.XMLHTTP")出错_html/css_WEB-ITnose,小编也收集到了有关xml=new ActiveXObject("Microsoft.XMLHTTP")出错_html/css_WEB-ITnose的相关资料,希望大家看到了会喜欢。

我在写一个js的脚本,我这么写 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.com/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.com不是你的域,不能跨域的

iframe.ip138.com不是你的域,不能跨域的 那我怎么能请求这个ip地址呢?

iframe.ip138.com不是你的域,不能跨域的 那我怎么能请求这个ip地址呢?

来源:php中文网

免责声明:本文由用户上传,如有侵权请联系删除!