Javascript 在新窗口中自动单击鼠标悬停

Javascript 在新窗口中自动单击鼠标悬停,javascript,html,Javascript,Html,这段代码运行正常 <a href="http://google.com/" onmouseover="window.location=this.href">Text</a> 但是我需要在新选项卡中打开链接,而不是使用窗口。位置,您可以使用: window.open('http://www.google.com', '_blank'); 在新窗口中打开。您可以使用它。但是新窗口 <a href="#" onmouseover="javascript:windo

这段代码运行正常

<a href="http://google.com/" onmouseover="window.location=this.href">Text</a>


但是我需要在新选项卡中打开链接,而不是使用
窗口。位置
,您可以使用:

window.open('http://www.google.com', '_blank');

在新窗口中打开。您可以使用它。但是新窗口

<a href="#" onmouseover="javascript:window.open('http://google.com')">Text</a>

或者使用javascript。此新选项卡

<a href="#" onmouseover="myFunction()">Text</a>
<script>
function myFunction() {
    var Open = window.open("http://www.kangsigit.com", "_blank");
}
</script>

函数myFunction(){
var Open=窗口打开(“http://www.kangsigit.com“,”空白“);
}

等待。onmouseover是否导航到新页面?似乎是一种奇怪的用户体验(UX)。触摸设备中不支持
onmouseover
。可能与do So Google dude重复这一点有很多答案already@ShivanRaptor,我指的是新的窗口/标签,而不是平板电脑或触摸设备…..窗口.打开(''.'空白');。。。。。在新窗口中打开,但我需要在新选项卡中,而不是在新窗口中!window.open('google.com';,'u blank');。。。。。在新窗口中打开,但我需要在新选项卡中,而不是在新窗口中!请阅读以下内容:。没有脚本可以控制在新选项卡/新窗口中打开新内容。取决于浏览器设置!