澳门新葡萄京官网注册ajax 注册验证

var xmlHttp = false;

var xmlHttp = false;

tr td height=34 align=center博客地址:/td td height=25 align=centerspan
class=STYLE1*澳门新葡萄京官网注册 ,/span/td tdlabel input name=blog type=text id=blog size=47
onblur=ajax(0); / /label/td td id=u_info/td /tr

try {xmlHttp = new ActiveXObject(Msxml2.XMLHTTP);} catch (e) {try
{xmlHttp = new ActiveXObject(Microsoft.XMLHTTP);} catch (e2) {xmlHttp =
false;}}

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;}}

OK下边这段作者原先写过了,可是为了有助于照旧也写出来了,最后申美素佳儿(FrisoState of Qatar下:本站原创文章转发请注解来:

以往大家把check.js文件代码来探视吧.

function ajaxcreate(){

function ajax(){ajaxcreate();var
xmvalue=document.getElementById(uid).value;var
url=ajax_check.php?txt=+encodeURI(xmvalue);if (xmvalue== null ||
xmvalue.length20 || xmvalue == ) return
false;xmlHttp.open(POST,url,true);xmlHttp.setRequestHeader(Content-Type,application/x-);xmlHttp.send(xmvalue);xmlHttp.onreadystatechange=returnstate;}function
returnstate(){if(xmlHttp.readyState != 4
){document.getElementById(u_info卡塔尔(قطر‎.innerHTML=div
class=defult正在验证请稍后…/div;}if(xmlHttp.readyState == 4
卡塔尔{document.getElementById(u_info).innerHTML=xmlHttp.responseText;}}

if( $ta==0){if(@file_get_contents($xm卡塔尔国卡塔尔{echo ‘div
id=successnbsp;nbsp;nbsp;nbsp;博客地址能够访谈/div’;}else{echo ‘div
id=error对不起,你输入的博客地址不可能健康访问div ‘;}}else{echo div
id=’error’对不起,无效的操作!/div;}

function ajaxcreate(){

ajaxcreate();xmvalue=document.getElementById(blog).value;var
url=ajax_check.php?txt=+encodeURI(xmvalue)+tag=+encodeURI(str)+rd=+Math.random();if
(xmvalue== null || xmvalue.length200 || xmvalue == ) return
false;xmlHttp.open(POST,url,true);xmlHttp.setRequestHeader(Content-Type,application/x-);xmlHttp.send(xmvalue);xmlHttp.onreadystatechange=returnstate;}function
returnstate(){if(xmlHttp.readyState != 4
){document.getElementById(u_info卡塔尔国.innerHTML=div
class=defult正在验证请稍后…/div;}if(xmlHttp.readyState == 4
卡塔尔国{document.getElementById(u_info).innerHTML=xmlHttp.responseText;}}

}

ajax 注册认证,前些天这一个文章有点怪了,正是验证url 是不是能被不荒谬访谈哦,

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.length12
|| uid.length3 ){document.getElementById(‘u_info’卡塔尔.innerHTML=’div
id=error小名长度为3-12字符!/div’;return
false;}else{document.getElementById(‘u_info’卡塔尔.innerHTML=’div
class=defult客户名长度3-11位/div’;}if(pwd ==” || pwd!=pwd2 ||
pwd.length6 ||
pwd.length12){document.getElementById(‘p_info’State of Qatar.innerHTML=’div
id=error密码无法为空或一回输入的密码不均等!/span’;return
false;}else{document.getElementById(‘p_info’).innerHTML=’div
id=success/div’;document.getElementById(‘p_info1′).innerHTML=’div
id=success/div’;}if( mo.match(/^[0-9]{3,4}-[0-9]{7,8}$/) ||
mo.match(/^(((d{3}))|(d{3}-))?13d{9}$/)
){document.getElementById(‘m_info’).innerHTML=’div
id=success/div’;}else{document.getElementById(‘m_info’).innerHTML=’div
id=error手机13875888888与座机/span’;return false;}if( name==” ||
name.length12 || name.length2
){document.getElementById(‘n_info’卡塔尔.innerHTML=’div
id=error请输入你的忠实姓名!/span’;return
false;}else{document.getElementById(‘n_info’).innerHTML=’div
id=success/div’;}

if (!xmlHttp typeof XMLHttpRequest != ‘undefined’) {xmlHttp = new
XMLHttpRequest();}if(!xmlHttp){alert(‘Create Xmlhttp Fail ‘);return
false;}}

好了自家依然反ajax 代码也写出来吧,

上边是大约的html代码程序.上边贴出php 验证代码.

发表评论

电子邮件地址不会被公开。 必填项已用*标注