嗨下面的代码打开窗口弹出窗口在IE中不起作用但与chrome一起工作正常..这会打开完整的新选项卡而不是弹出窗口。
<form method="" action="url" onsubmit="openTarget(this,'width=550,height=500,location=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,toolbar=no,left=150,top=150,screenX=150,screenY=150'); return true;">
<input type="text" name="by_name" value="" class="SearchBox">
<input type="submit" value="Go">
</form>
和JS
<Script>
function openTarget (form, features, windowName) {
if (!windowName)
windowName = 'ybrx_window';
form.target = windowName;
open ('', windowName, features);
}
</Script>
答案 0 :(得分:0)
使用以下脚本:
<Script>
function openTarget (form, features, windowName) {
if (!windowName)
windowName = 'ybrx_window';
form.target = windowName;
window.open('', windowName, features, '_blank');
}
</Script>
感谢。