How would I go about making the button open in a new window, emulating "a href, target = _blank"?
I currently have:
<button class="button" onClick="window.location.href='http://www.example.com';"> <span class="icon">Open</span> </button>
The button isn't in a form, I just want to make it open in a new window.
Open in a new window To open a link in a new browser window, hold the Shift on then click the link or right-click the link and select Open link in New Window.
Opens a new window with the url you supplied :)
<button class="button" onClick="window.open('http://www.example.com');"> <span class="icon">Open</span> </button>
hope that helps :)
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