简体   繁体   English

JS / HTML:在IE8中的新浏览器窗口中打开链接

[英]JS/HTML: Opening a link in a new browser window in IE8

So I am trying to make a link that opens a full image version of the one I have in a small version in a new browser window, and I am using the following code (: 因此,我试图建立一个链接,以在新的浏览器窗口中打开小版本的完整图像版本,而我正在使用以下代码(:

<a href="#" class ="postImageA" onClick="MyWindow=window.open('http://www.w3schools.com/html/tryit.asp?filename=tryhtml_video_html5_4','MyWindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1024,height=768'); return false;">test for StackOverflow</a>

It works in all browsers, except in our favorite IE8. 它适用于所有浏览器,但我们最喜欢的IE8除外。 Any ideas on how to make it work? 关于如何使其运作的任何想法?

You will have to make sure IE is set to open in new window. 您必须确保将IE设置为在新窗口中打开。

Go to Tools > Internet Options > General. 转到工具> Internet选项>常规。 Click on the Settings button in the Tabs section. 单击选项卡部分中的设置按钮。 Set the value of "When a popup is encountered" to "Always open popups in a new window." 将“遇到弹出窗口时”的值设置为“始终在新窗口中打开弹出窗口”。

One other thing I had to do was right-click on the yellow banner at the top of the page that says, "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer. Click here for options..." 我要做的另一件事是右键单击页面顶部的黄色横幅,该横幅为:“为了帮助保护您的安全,Internet Explorer限制了该网页的运行脚本或ActiveX控件的访问权限。这里供您选择...”

I right-clicked on it and chose: "Allow Blocked Content..." 我右键单击它,然后选择:“允许阻止的内容...”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM