This code is working fine..
<a href="http://google.com/" onmouseover="window.location=this.href">Text</a>
But I need to open the link in a new tab
This code is working fine..
<a href="http://google.com/" onmouseover="window.location=this.href">Text</a>
But I need to open the link in a new tab
Instead of using window.location
, you can use:
window.open('http://www.google.com', '_blank');
to open in new window.
You can use it. But New Window
<a href="#" onmouseover="javascript:window.open('http://google.com')">Text</a>
OR use javascript. This New TAB
<a href="#" onmouseover="myFunction()">Text</a>
<script>
function myFunction() {
var Open = window.open("http://www.kangsigit.com", "_blank");
}
</script>