gpt4 book ai didi

javascript - Windows 手机 8 : Open Link in new Tab

转载 作者:太空狗 更新时间:2023-10-29 16:42:29 26 4
gpt4 key购买 nike

我尝试过多种方法来实现这一点,但都不起作用:

<a href="url" target="_blank"/>

<a href="javascript:void(0)" onclick="window.open(url)"/>

<a href="javascript:void(0)" onclick="window.open(url,'_blank')"/>

<a href="javascript:void(0)" onclick="window.open(url,'_newtab')"/>

<a href="javascript:void(0)" onclick="window.open(url,'popup','width=640,height=480')"/>

我读了here这是不可能在 Windows Phone 7 上以编程方式控制的,但是我需要一个适用于 Windows Phone 8 的解决方案。

最佳答案

There are some minor differences between Internet Explorer 10 for Windows 8 and Internet Explorer 10 for Windows Phone that you need to be aware of. Internet Explorer 10 for Windows Phone does not support the following:

  • Cross-tab communication via script (as a result window.open opens the destination URL in the same tab)
  • Also in Internet Explorer 10 for Windows Phone, Window.open does not return a valid window object. This is because on the phone each “window” is isolated in its own sandbox.

引自 http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/08/internet-explorer-10-brings-html5-to-windows-phone-8-in-a-big-way.aspx - 打开完整列表的链接。

关于javascript - Windows 手机 8 : Open Link in new Tab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17021903/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com