发送ajax没反映,没报错什么反映也没有,经常遇到这种情况。用户注册界面使用ajax,处理ajax请求的是另一个php.下面是注册界面的javascript部分:<br /> function checkname(name)<br /> {<br /> var value=document.getElementById(name).value;<br /> var error_tip=name+"_error_tip";<br /> if(value=="")<br /> {<br /> document.getElementById(error_tip).innerHTML="Name cannot be empty";<br /> document.getElementById(error_tip).style.visibility="visible";<br /> return false;<br /> }<br /> else<br /> {<br /> var patt1=new RegExp("[0-9]");<br /> var patt2=new RegExp("[^A-z]");<br /> var r1=patt1.test(value);<br /> if(r1)<br /> { <br /> document.getElementById(error_tip).innerHTML="Name can not contain digital";<br /> document.getElementById(error_tip).style.visibility="visible";<br /> return false;<br /> }<br /> var r2=patt2.test(value); <br /> if(r2)<br /> {<br /> document.getElementById(error_tip).innerHTML="The name can not contain numbers or punctuation marks";<br /> document.getElementById(error_tip).style.visibility="visible";<br /> return false;<br /> }<br /> }<br /> document.getElementById(error_tip).style.visibility="hidden";<br /> return true;<br /> } <br /> function checkemail(name)<br /> {<br /> var validchar="[email protected].";<br /> var value=document.getElementById(name).value;<br /> var error_tip=name+"_error_tip";<br /> var flag1=0;<br /> var flag2=0;<br /> if(value=="")<br /> { <br /> document.getElementById(error_tip).innerHTML="Email cannot be empty";<br /> document.getElementById(error_tip).style.visibility="visible";<br /> return false;<br /> }<br /> else<br /> {<br /> for(var i=0;i<value.length;i++)<br /> {<br /> if(validchar.search(value[i])==-1)<br /> {<br /> document.getElementById(error_tip).innerHTML="Please enter a valid email";<br /> document.getElementById(error_tip).style.visibility="visible";<br /> return false;<br /> }<br /> if(value[i]=="@")<br /> {flag1++;}<br /> if(value[i]==".")<br /> {flag2++;}<br /> }<br /> if((flag1!=1)||(flag2!=1))<br /> {<br /> document.getElementById(error_tip).innerHTML="Please enter a valid email";<br /> document.getElementById(error_tip).style.visibility="visible";<br /> return false;<br /> }<br /> document.getElementById(error_tip).style.visibility="hidden";<br /> return true;<br /> }<br /> } <br /> function checkpw(name)<br /> {<br /> var value=document.getElementById(name).value;<br /> var error_tip=name+"_error_tip";<br /> if(value=="")<br /> {<br /> document.getElementById(error_tip).innerHTML="Password cannot be empty";<div class="clear">