1,監聽textarea的onkeydown事件
function sbFrm() {var Contenthf=document.getElementById("Contenthf");var txtAr = Contenthf.getElementsByTagName("textarea")[0];if (txtAr.innerHTML == "") {txtAr.focus();return false;}Contenthf.submit();window.opener.afterReload();return false;}
3,當ctrl鍵被按下,并且,keycode為13(回車),時,調用發送表單的函數。
function keySend(event) {if (event.ctrlKey && event.keyCode == 13) {sbFrm();}}
4,如果是window.open()方式打開的當前頁面,則在window.open的這個頁面加入重新加載函數
function afterReload() {setTimeout(function () {window.location.reload();}, 1000);}
新聞熱點
疑難解答