js 验证不成功
来源:百度知道 编辑:UC知道 时间:2024/07/02 20:41:12
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户注册</title>
</head>
<SCRIPT language=JavaScript>
function Checkform(form){
if(form.username.value==''){
alert("用户名不能为空");
form.username.focus();
return false;
}
if(form.department.value.length>16){
alert("用户名不能超过16个字符!");
form.username.focus();
return false;
}
if(form.password.value==''
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户注册</title>
</head>
<SCRIPT language=JavaScript>
function Checkform(form){
if(form.username.value==''){
alert("用户名不能为空");
form.username.focus();
return false;
}
if(form.department.value.length>16){
alert("用户名不能超过16个字符!");
form.username.focus();
return false;
}
if(form.password.value==''
现在OK··你的错误有点多哦·
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户注册</title>
</head>
<SCRIPT language=JavaScript>
function Checkform(form){
if(form.username.value==''){
alert("用户名不能为空");
form.username.focus();
return false;
}
if(form.username.value.length>16){
alert("用户名不能超过16个字符!");
form.username.focus();
return false;
}
if(fo