Latox Latox - 1 year ago 107
HTML Question

Open button in new window?

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='';"><span class="icon">Open</span></button>

The button isn't in a form, I just want to make it open in a new window.

Answer Source

Opens a new window with the url you supplied :)

<button class="button" onClick="'');"><span class="icon">Open</span></button>

hope that helps :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download