- 〈scriptlanuage="javaScript"〉
- functioncreateXMLHttpRequest(){
- if(window.ActiveXObject){
- xmlHttp=newActiveXObject("Microsoft.XMLHTTP");
- }
- elseif(window.XMLHttpRequest){
- xmlHttp=newXMLHttpRequest();
- }
- }
- functioncheckName(){
- createXMLHttpRequest();
- xmlHttp.onreadystatechange=handleStateChange;
- varsql="UserReg.aspx?";
- xmlHttp.open("GET",sql,true);
- xmlHttp.send(null);
- }
- functionhandleStateChange(){
- if(xmlHttp.readyState==4){
- if(xmlHttp.status==200){
- document.getElementById("divx").innerHTML=xmlHttp.responseText;
- }
- }
- }
- 〈script〉