注册 登录
编程论坛 jQuery论坛

高手们指教!浏览器提示错误!但是找不出原因!谢谢

wcbts520 发布于 2009-09-22 11:44, 1580 次点击
<html>
<head>
<title></title>
<script language="javascript" type="text/javascript">
var xmlHttp;
function createXMLHttpRequest()
{
   if(window.ActiveXObject)
    {
       xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
   else
    {
        xmlHttp=new XMLHttpRequest();  
    }
}
function startRequest()
{
   createXMLHttpRequest();
   xmlHttp.OnReadyStateChange=handlestateChange();
   xmlHttp.open("GET","src.xml",true);
   xmlHttp.send(null);
}
function handlestateChange()
{
  if(xmlHttp.readyState==4)
   {
     if(xmlHttp.status==200)
       {
     alert("the server replied with:"+xmlHttp.responseText);

   }
}
</script>
</head>
<body>
<form action="#">
  <input type="button" value="start Basic" onclick="startRequest();"/>
</form>
</body>
</html>
1 回复
#2
tang6882010-01-13 19:23
提示的是什么错误呢?
1