经常看到许多网站论坛上面快捷键提交表单的方法,比较好奇,经研究写出来了方法
JS CTRL+ENTER 提交
- <script language=javascript>
- ie = (document.all)? true:false
- if (ie){
- function ctlent(eventobject){if(event.ctrlKey && window.event.keyCode==13){this.document.form1.submit();}}
- }
- </script>
- <form action="http://www.webjx.com/index.html" method=POST name=form1>
- <textarea cols=95 name=Content rows=12 wrap=virtual onkeydown=ctlent()>
- Ctrl+Enter提交内容信息
- </textarea>
- <input type=Submit value="Submit" name=Submit>
- </form>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>无标题文档</title>
- </head>
- <body>
- <form action="http://www.webjx.com/index.html" method=POST name=form1>
- <textarea ></textarea>
- <br><input type=submit accessKey="S" value=提交(Alt+s)>
- </form>
对于快捷键的使用IE:ALT+快捷键