firefox下 判断用户名为空的问题
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"><!--上面的不能删除或修改,因涉及到样式--><HTML><HEAD><TITLE>登录</TITLE><META content="text/html; charset=utf-8" http-equiv="Content-Type"><META content="no-cache, must-revalidate" http-equiv="Cache-Control"><META content="0" http-equiv="expires"><!--function check(){ if(document.getElementById("usrname").value.length<3 || document.getElementById("usrname").value.length==""||document.getElementById("usrname").value=="请输入用户名") { alert(document.getElementById("usrname").value); loginForm.Login.focus(); return false; }}//--></SCRIPT><BODY ><FORM name="loginForm" action="check.jsp" method="post" onsubmit='return check()'><INPUT onblur="if(this.value=='') this.value='请输入用户名';this.className='inputstyle';return true;" id="usrname" class="inputstyle" onfocus="if(this.value=='请输入用户名') this.value='';this.className='inputstylefocus';return true;" value="请输入用户名" maxLength="20" style="line-height:26px" name="Login" autocomplete="off"> <INPUT class="loginbtn" onMouseDown="this.className='loginbtnfocus';return true;" value="提交" type="submit" name="login"> </FORM></BODY ></HTML>