<!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> <title> new document </title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <meta name="author" content="" / </head> <body onkeydown="keyLogin();"> <input type="text" class="pass" value="" /> <div id="enter" class="login" onclick="enter_login();"> 登录</div> <script type="text/javascript"> function enter_login(){ var pwd = $(".pass").val(); if(pwd==""){ alert(1); }else{ alert(2); } } function keyLogin(){ if (event.keyCode==13){ document.getElementById("enter").click(); } } </script> </body></html>
- 2 回答
- 0 关注
- 590 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消