现在我们把check.js文件代码来看看吧.
function c(){
var uid =document.getElementById('uid').value;
var pwd =document.getElementById('password').value;
var pwd2=document.getElementById('password2').value;
var mo =document.getElementById('mo').value;
var name=document.getElementById('name').value;
if( uid=='' || uid.length>12 || uid.length
document.getElementById('u_info').innerHTML='
}
var xmlHttp = false;
function ajaxcreate(){
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp = false;
}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
if(!xmlHttp){alert('Create Xmlhttp Fail ');return false;}
}
function ajax(){
ajaxcreate();
var xmvalue=document.getElementById("uid").value;
var url="ajax_check.php?txt="+encodeURI(xmvalue);
if (xmvalue== null || xmvalue.length>20 || xmvalue == "") return false;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send(xmvalue);
xmlHttp.onreadystatechange=returnstate;
}
function returnstate(){
if(xmlHttp.readyState != 4 ){
document.getElementById("u_info").innerHTML="
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号