Press Ctrl+Enter to submit the form
Friday on December 2nd, 2005Life
Press Ctrl+Enter to submit the form
. I spent a long time searching for this function that I need to use today.
<form name='FORM' method='post' action=''> <textarea onkeydown=quickpost() name='content' cols='100' rows='8'></textarea> Press Ctrl+Enter to directly submit input type='submit' name='Submit' value='submit' onclick='return checkCnt();'> </form><script language=JavaScript>ie = (document.all)? true:false;cnt = 0;if (ie){ function quickpost(eventobject) { if((event.ctrlKey && window.event.keyCode == 13)\|\|(event.altKey && window.event.keyCode == 83)) { this.document.FORM.submit(); } }}function checkCnt() { cnt++; if (cnt==1) return true; alert ('Content has been submitted! Please wait... '); return false;}</script>
Copyright Protection: ShuDudu from the original article, reproduced Please keep the link: https://www.shududu.com/life/Press-Ctrl-Enter-to-submit-the-form.htm