<script lanuage = "javaScript">
//创建对象
function createXMLHttpRequest(){
if(window.ActiveXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
}
//前台界面事件调用的函数
function checkName(){
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
var sql = "UserReg.aspx?";
xmlHttp.open("GET",sql,true);
xmlHttp.send(null);
}
//和服务器交互期间执行的函数
function handleStateChange(){
if(xmlHttp.readyState == 4){
if(xmlHttp.status == 200){
document.getElementById("divx").innerHTML = xmlHttp.responseText;
}
}
}
</script>
posted on 2007-05-02 10:40
jadmin 阅读(71)
评论(0) 编辑 收藏