此代碼工作正常新窗口..自動點擊鼠標懸停在
<a href="http://google.com/" onmouseover="window.location=this.href">Text</a>
但我需要在新標籤頁中打開鏈接
此代碼工作正常新窗口..自動點擊鼠標懸停在
<a href="http://google.com/" onmouseover="window.location=this.href">Text</a>
但我需要在新標籤頁中打開鏈接
您可以使用它。但新窗口
<a href="#" onmouseover="javascript:window.open('http://google.com')">Text</a>
或使用JavaScript。 This 新標籤
<a href="#" onmouseover="myFunction()">Text</a>
<script>
function myFunction() {
var Open = window.open("http://www.kangsigit.com", "_blank");
}
</script>
等待。 onmouseover導航到新頁面?似乎是一種奇怪的用戶體驗(UX)。觸摸設備不支持'onmouseover'。 – Raptor
[JavaScript:location.href可能在新窗口/標籤中打開?](http://stackoverflow.com/questions/5141910/javascript-location-href-to-open-in-new-window-tab) – Raptor
做一些谷歌搜索的朋友 有很多的答案,這已經 –