Button Links

JavaScript FAQ | Navigation Enhancements  

Question: Can I make a button on my page work as a hyperlink to another page?

Answer: To create a button that works as a
you can use this code:
<form> 
<input type=button 
value="insert button text here"
onClick="self.location='Your_URL_here.htm'">
</form> 
Just change the button text and the target URL to whatever you want. Try it now:

You can use absolute URLs (like http://www.javascripter.net) as well as relative URLs (like mypage.htm).

Copyright © 1999-2011, JavaScripter.net.