js实现是通过Ctrl+Enter发送的

1、倾听文本的onkeydown事件

复制代码代码如下所示:





2,发送表单,并重新加载打开窗口(参见4)。


功能sbfrm(){
无功contenthf = document.getelementbyid(contenthf );
无功txtar = contenthf.getelementsbytagname(文本){ 0 };
如果(txtar.innerhtml = ={)
TxtAr.focus();
返回false;
}
Contenthf.submit();
Window.opener.afterReload();
返回false;
}


3、当Ctrl键被按下的键码为13(回车),发送的形式调用函数。


功能keysend(事件){
如果(event.ctrlkey Event.keyCode = = 13){
SbFrm();
}
}


4,如果当前页在window.open打开()模式,重装功能添加到window.open页


功能afterreload(){
setTimeout(){()函数(
Window.location.reload();
},1000);
}