1. Textarea Onkeydown 이벤트를 들어보십시오
코드 사본은 다음과 같습니다.
<textArea tabindex = "1"name = "contenthf.contenthf"onkeydown = "키 엔드 (이벤트);"> </textRea>
2, 양식을 보내고 오프너 창을 다시로드하십시오 (4 참조)
함수 sbfrm () {var contenthf = document.getElementById ( "contenthf"); var txtar = contenthf.getElementsByTagName ( "textArea") [0]; if (txtar.innerHtml == "") {txtar.focus (); return false;3. CTRL 키를 누르고 키 코드가 13 (Enter) 인 경우 양식을 보내는 함수가 호출됩니다.
function keysend (event) {if (event.ctrlkey && event.keyCode == 13) {sbfrm ();}}4. Window.open ()로 현재 페이지가 열리면 Window.open 의이 페이지에 다시로드 함수를 추가하십시오.
function apfetreload () {settimeout (function () {window.location.reload ();}, 1000);}