document.write('"); function checkData(){ if($("login-user-name").value ==""){ alert('请输入用户名!'); $("login-user-name").focus(); return false; } if($("login-user-pwd").value ==""){ alert('请输入密码!'); $("login-user-pwd").focus(); return false; } return true; }