使用js判断登陆框不能为空:
代码
<
script type
=
"
text/javascript
"
>
function test(){
if (document.form1.txtusername.value == "" || document.form1.txtpwd.value == "" )
{
alert ( " 请输入用户名和密码 " );
document.form1.txtusername.focus();
return false ;
}
}
< / script>
function test(){
if (document.form1.txtusername.value == "" || document.form1.txtpwd.value == "" )
{
alert ( " 请输入用户名和密码 " );
document.form1.txtusername.focus();
return false ;
}
}
< / script>