如下:
<form method="post" name="search" action="Freight_search.asp" target="newFormWindow" onsubmit="return checkform();window.open('about:blank', 'newFormWindow', 'width=340,height=260');">这是一个搜索用的表单,其中我想同时使用两个onsubmit,前一个是验证表是否为空的,后一个是为了将表单的信息提交到一个新的窗口!可是像我上面那样写,后面一个不能正常运行,请问像这样的情况应该怎样写才正确?
參考答案:onsubmit="if(checkform()){window.open('about:blank', 'newFormWindow', 'width=340,height=260');}else{return false}"