1. Listen to the textarea onkeydown event
The code copy is as follows:
<textarea tabindex="1" name="contenthf.contenthf" onkeydown="keySend(event);"></textarea>
2, Send the form and reload the opener window (see 4,)
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. When the ctrl key is pressed and the keycode is 13 (Enter), the function that sends the form is called.
function keySend(event) {if (event.ctrlKey && event.keyCode == 13) {sbFrm();}}4. If the current page is opened by window.open(), add a reload function to this page of window.open
function afterReload() {setTimeout(function () {window.location.reload();}, 1000);}