<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 閱讀(74)
評論(0) 編輯 收藏