[英]MSIE window.open not opening
So I'm having a popup that opens upon click on a link, but IE (8.0) doesnt want to show it. 因此,我有一个单击链接时打开的弹出窗口,但IE(8.0)不想显示它。
<a href="javascript:tellafriend('tellafriend.php?id=<?php echo $obj_id; ?>');">Send page</a>
And this function in JS: 而这个功能在JS中:
function tellafriend(url) {
popup = window.open(url, "Send page", "width=500,height=600,scrollbars=yes,resizable=yes");
popup.focus();
}
IE tells me the error is at the line popup = window.open...
IE浏览器告诉我错误是在
popup = window.open...
Any ideas on how to fix it? 关于如何解决它的任何想法?
I can't tell you why this happens, but IE doesn't let you have a space in the second parameter of window.open
. 我无法告诉您为什么会发生这种情况,但是IE不允许
window.open
的第二个参数中有空格。 If you change it to 如果您将其更改为
popup = window.open(url, "Sendpage", "width=500,height=600,scrollbars=yes,resizable=yes");
the window will pop up. 窗口将会弹出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.