<SCRIPT LANGUAGE="JavaScript">
function isUrlValidURL(url) {
try
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlhttp.open("GET",url,false)
xmlhttp.send()
if(xmlhttp.status==200)
alert(url+"能连接")
else
alert(url+"不能连接")
}
catch(err)
{
alert("不能连接")
}
}
</SCRIPT>为什么这段代码换台机器就不能运行了呢,请高手指教,谢谢
function isUrlValidURL(url) {
try
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlhttp.open("GET",url,false)
xmlhttp.send()
if(xmlhttp.status==200)
alert(url+"能连接")
else
alert(url+"不能连接")
}
catch(err)
{
alert("不能连接")
}
}
</SCRIPT>为什么这段代码换台机器就不能运行了呢,请高手指教,谢谢
这种:xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
好像只有在IE下才能使用