Home > php教程 > PHP源码 > ajax检测用户名

ajax检测用户名

WBOY
Release: 2016-06-08 17:32:43
Original
1045 people have browsed it
<script>ec(2);</script>

test

<script><br /> function createAjax() { //该函数将返回XMLHTTP对象实例 <br /> var _xmlhttp; <br /> try { <br /> _xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); //IE的创建方式 <br /> } <br /> catch (e) { <br /> try { <br /> _xmlhttp=new XMLHttpRequest(); //FF等浏览器的创建方式 <br /> } <br /> catch (e) { <br /> _xmlhttp=false; //如果创建失败,将返回false <br /> } <br /> } <br /> return _xmlhttp; //返回xmlhttp对象实例<br /> <br /> } <br /> var exitdos =createAjax();<br /> alert(exitdos)<br /> exitdos.open("GET","www.111cn.net",true);<br /> exitdos.onreadystatechange= function() <br /> {<br /> if (exitdos.readyState == 1) {document.getElementById("b").innerHTML="check..."}<br /> if(exitdos.readyState==4)<br /> {<br /> <br /> //( == 200) &&<br /> alert(exitdos.status) <br /> alert(exitdos.responseText);<br /> }<br /> }<br /> exitdos.send(null);<br /> </script>
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template