来了 活了 爱了 - 杨余斌的个人主页

268 元 丰胸极限 美国魔力丰丰乳片mirifem
最火爆的丰胸品-美国魔力丰丰乳片mirifem

268 元 绝对NO1新版mirifem魔力丰丰胸片
美国顶级产品 畅销世界各地 强势登陆国内

156 元 消腩宝贝 快速瘦身 月减20斤
★★妙妙独家代理★★消腩宝贝★★速效减肥胶囊★月

JavaScript表单验证

作者:杨余斌    来自: 加入时间:2007-Mar-27

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>


[声明]
    以上文章如果标明为杨余斌自创,在转载时必须注明出处,并且不得修改文章内容,和文章内的链接等。
    以上文章或资料除注明为杨余斌自创或编辑整理外,均为各方收集或网友推荐所得。其中摘录的内容以共享、研究为目的,不存在任何商业考虑。
    目前网站上有些文章未注明作者或出处,甚至标注错误,此类情况出现并非不尊重作者及出处网站,而是因为有些资料来源的不规范。如果有了解作者或出处的原作者或网友,请告知,本网站将立即更正注明,并向作者或出处单位道歉。
    被摘录的对象如有任何异议,请与本站联系,联系邮箱:webmaster at yangyubin.com,本站确认后将立即撤下。谢谢您的支持与理解
合作伙伴

999 元 海胆精-给男人动力,换女人激情
青岛海汇公司国家发明专利,具有滋阴补肾功能

Text Link Ads
Text Link Ads,注册就送100美元!




Copyright © 2006 www.yangyubin.com All rights reserved.
| Wind CMS 文章管理系统1.0 |