function
check(form)
...
{
var obj=form.elements||form;
for (var i=0;i < obj.length;i++)...{
if (obj[i].getAttribute("msg")!="")...{
if (obj[i].value.replace(/(^s*)|(s*$)/g,"")=="")...{
alert(obj[i].getAttribute("msg")+"不能为空!");
obj[i].focus();
return false;
}
}
}
if (form.Pwd.value!=form.Pwd1.value)...{
alert("两次输入的密码不一致,请重新输入!");
form.Pwd.focus();
return false;
}
return true;
}
var obj=form.elements||form;
for (var i=0;i < obj.length;i++)...{
if (obj[i].getAttribute("msg")!="")...{
if (obj[i].value.replace(/(^s*)|(s*$)/g,"")=="")...{
alert(obj[i].getAttribute("msg")+"不能为空!");
obj[i].focus();
return false;
}
}
}
if (form.Pwd.value!=form.Pwd1.value)...{
alert("两次输入的密码不一致,请重新输入!");
form.Pwd.focus();
return false;
}
return true;
}