| 
	| 〖文章分类:电脑·手机·网络 / 网站设计·开发·优化〗〖阅读选项〗 |  | <script language = javascript> function test(){
 if (document.sub.uname.value.length<4){
 alert("姓名最小长度为4!");
 document.sub.uname.select();
 return false;
 }
 if(/[^A-Za-z0-9_]/.exec(document.sub.uname.value)!=null)
 {
 alert("姓名只能由数字、字母、下划线组成!");
 document.sub.uname.select();
 return false;
 }
 if (/[\s]/.exec(document.sub.upsw.value)!=null) {
 alert("密码不能含有空白字符!");
 document.sub.upsw.focus();
 return false;
 }
 if (document.sub.upsw.value.length <4) {
 alert("密码最小长度为4!");
 document.sub.upsw.focus();
 return false;
 }
 if (document.sub.upswd.value.length == 0) {
 alert("请输入您的确认密码!");
 document.sub.upswd.focus();
 return false;
 }
 if (document.sub.upswd.value!=document.sub.upsw.value ) {
 alert("您的密码与确认密码不匹配请从新输入!");
 document.sub.upswd.focus();
 return false;
 }
 if(document.sub.uemail.value.length !=0){
 if(/@/.exec(document.sub.uemail.value)==null){
 alert("请注意E-Mail的正确形式!");
 document.sub.uemail.select();
 return false;
 }
 }
 if (isNaN(document.sub.uqq.value)){
 alert("QQ需为数字形式!");
 document.sub.uqq.select();
 return false;
 }
 return true;
 }
 </script>
 
 
 |  | 文章作者:未知  更新日期:2005-12-15 |  | 〖文章浏览:〗〖发送文章〗〖打印文章〗 |  |  |  |