在FireFox下如何将回车键转换为Tab键
来源:互联网 发布:澳大利亚导航软件中文 编辑:程序博客网 时间:2024/04/28 03:24
<!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script src="http://code.jquery.com/jquery-latest.js"></script><script type="text/javascript"> $(function(){$("input:text").keypress(function(event){if (event.keyCode== 13)$(this).nextAll("input:first").focus();});}); </script> </head> <body> <form> <input type="text" id="input1" /> <input type="text" id="input2" /> <input type="text" id="input3" /> <input type="text" id="input4" /> </form> </body> </html>