急啊!ajax 的前台 我的这个 代码有什么问题?怎么老是运行不起来呢?
先不说发不发得出去,连一点反应也没有??
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml " >
<head runat= "server ">
<title> 首页 </title>
<script type= "text/javascript " language= "javascript ">
function $(id){return document.getElementById(id);}
var xmlHttp;
var message;
var div=$( "div ");
div.innerText= "什么都没了! ";
function createXMLHttpRequest()
{
if(window.ActiveXObject)
{
//xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP ");
xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP.5.0 ");
}
else if(window.XMLHttpRequest)
{
xmlHttp =new XMLHttpRequest();
}
div.innerText= " 创建了 XMLHttpRequest 对象 了! ";
}
function startRequest()
{
//div.innerText= " 执行函数 ";
createXMLHttpRequest();
&