Just a question about optimization, between :
<a href="#" onClick="javascript:window.open('myUrl.com');">link-1</a>
and :
<a href="javascript:window.open('myUrlBis.com');">link-2</a>
Is one better than the other ? Or more compatible ? Thanks.
Best practice is to use the target
attribute:
<a href="http://myUrl.com" target="_blank">link-1</a>
If that doesn't suit, a click
handler (ideally not assigned via attribute) would be my take.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With