<script language="javascript">
var req;
function test()
{ var id;
id = document.form.a.value;
url="show.asp?id="+id;
req = new ActiveXObject('Microsoft.XMLHTTP');//创建对象
req.open('get',url,true);
req.onreadystatechange=callback;//Callback是函数
req.send(null);//即时返回(调了马上就返回)异步
}
function callback()
{ var state = req.readyState ;
if(state==4)
{
var data = req.responseText;
fillinfo(data);
}
}
function fillinfo(Message)
{
var divname = document.getElementById("info");
divname.innerHTML = Message;
}
</script>
<body>
<form name="form">
<input type="text" name="a" id="a" /><input type="button" onclick="test()" value="确定" />
</form>
<div id="info"></div>
更多信息请查看IT技术专栏