【发布时间】:2023-03-08 19:45:01
【问题描述】:
除了 IE,所有浏览器都可以使用我的代码。你知道我可以做些什么来让它在 IE 上也能运行吗?
<script>
function submitForm(formId) {
var w = window.open('', 'myPopup', "width=600, height=600");
$(formId).attr('target', 'myPopup');
$(formId).submit();
w.focus();
return false;
}
</script>
<form target="myPopup" onsubmit="return submitForm(this);" method="post" action="" name="myForm" id="myForm">
<input type="submit" />
</form>
【问题讨论】:
-
你能解释一下当你在 IE 中点击提交按钮时会发生什么吗?我得到另一个带有提交按钮的窗口。
-
使用其他浏览器时,windoes 会弹出并在 1 秒内出现内容。使用 IE,win 会弹出并保持空白超过 10 秒。当我尝试关闭弹出窗口时,它会再次出现 3-5 次或浏览器崩溃。
-
好的,所以我找到了this link,它讨论了 IE9 中提交按钮和表单的问题。它可能不是您想要的,但它是一个开始。
标签: forms internet-explorer popup submit