Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 313
xarzu Avatar asked Feb 24 '10 06:02

xarzu


1 Answers

onclick and window.open

<input type="button" onclick="window.open('http://www.example.com','_blank','resizable=yes')" />
like image 118
YOU Avatar answered Sep 30 '22 20:09

YOU