javascript表单验证问题,,急啊!

[复制链接]
查看11 | 回复1 | 2009-6-10 18:29:55 | 显示全部楼层 |阅读模式
各位友友看看代码哪错啦调用函数时checkPwd()没作用啊
function checkUser(){
var name = document.form1.textuser.value;
if(name.length!=0){
for(i=0;i0){
alert("用户名中不能包含数字!");
return faulse;
}
}
}
else{
alert("请输入用户名!");
return faulse;
}
return ture;
}
function checkPwd(){
var pwd = document.form1.textpassword.value;
if(pwd==""){
alert("请输入密码!");
return faulse;
}
if(pwd.length

回复

使用道具 举报

千问 | 2009-6-10 18:29:55 | 显示全部楼层
返回值写错误了 ,改为:return true;return false;...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行