参考网站
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42<html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" href="css/text.css" type="text/css"> </head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" οnkeydοwn="on_return();"> <form name ="loginForm" method="post" action="https://www.baidu.com"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="69%" height="30"><span class="font_04">帐户名</span> <input type="text" name="userName" size="18.5"> </td> </tr> <tr> <td width="69%" height="30"><span class="font_04">密 码</span> <input type="password" name="pwd" > </td> </tr> <tr> <td width="31%" height="30"> <a id="sub" onClick='check()' > 登陆</a></td> </tr> </table> </form> </body> </html> <script language="javascript"> function check() { var formname=document.loginForm; formname.submit(); } //回车时,默认是登陆 function on_return(){ if(window.event.keyCode == 13){ if (document.all('sub')!=null){ document.all('sub').click(); } } } </script>
最后
以上就是缥缈饼干最近收集整理的关于html回车键登录的全部内容,更多相关html回车键登录内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复