How do you make an HTML button behave just like a hyperlink?

html, javascript, onclick

Solution

onclick and window.open

<input type="button" onclick="window.open('http://www.example.com','_blank','resizable=yes')" />

Problem

How do you make an HTML button behave just like a hyperlink where, if you click on it, it will open a browser window showing a page you want? I understand this much. I think I will use this but instead of a link to some javascript code inside the quotes for "onclick" I want to put something simple that will launch a new browser window.

Original source