In this example, three files are required: Ajax. jsvar xmlHttp; // function S_xmlhttprequest () {if (window. activeXObject) {xmlHttp = new ActiveXObject ('Microsoft. XMLHTTP ');} else if (window. XMLHttpRequest) {xmlHttp = new XMLHttpRequest () ;}} function funphp100 (name) {// get form Content // http://www.ruoshuiyx.com Shenyang site construction var f = document. myform. user. value; // reference the instantiation process S_xmlhttprequest (); // open the request xmlHttp. open ("GET", "index. php? Id = "+ f, true); // you are ready to execute xmlHttp. onreadystatechange = byphp; xmlHttp. send (null);} function byphp () {if (xmlHttp. readyState = 1) {document. getElementById ('php100 '). innerHTML = " </script> <formname =" myform "action =" "method =" post "enctype =" type/plain "> username // http://www.ruoshuiyx.com Shenyang website construction: <inputtype = "text" name = "user" value = "" onblur = "funphp100 ('php100 ') "> <divid =" php100 "> </div> </form> Index. php <? Phpif ($ id = $ _ REQUEST [id]) {// for ($ I = 1; $ I <3; $ I ++) /// {// echo $ id; // sleep (1); //} sleep (2); if ($ id = '20140901 ') {echo "already exists";} else {echo "can be registered";} // exit () ;}?> Knowledge Point: 1. Ajax technology implements the user name check Principle 2. Learning HTML to trigger several onblur events will occur when the object loses focus. The onchange event occurs when the domain content changes. The onclick event occurs when the object is clicked. The onfocus event occurs when the object obtains the focus. The onkeydown event occurs when you press a keyboard button. The onkeypress event occurs when the keyboard key is pressed and a key is released. The onkeyup event occurs when the keyboard button is released. The onmousedown event occurs when the mouse is pressed. The onmousemove event occurs when the mouse pointer moves. The onmouseout event occurs when the mouse pointer is removed from the specified object. The onmouseup event occurs when the mouse button is released. 3. How to obtain the data content in the form <formname = "myform "... <Inputname = user type = text value = ""> </form> document. myform. user. value