form表单中去掉默认的enter键提交并绑定js方法实现代码_javascript技巧
时间:2021-07-01 10:21:17
帮助过:6人阅读
代码如下:
代码如下:
function dosearch(){
var keywords=$("#s").val();
keywords=encodeURI(keywords);
keywords=encodeURI(keywords);
// window.open("${ctx}/DispatchAction.do?serviceName=SearchWeb&efFormEname=FS01&methodName=query&i-0-page=0&i-0-keywords="+keywords+"&i-0-moduleId=bmoa_badc");
location.href="${ctx}/DispatchAction.do?serviceName=SearchWeb&efFormEname=FS01&methodName=query&i-0-page=0&i-0-keywords="+keywords;
}