Jump to content

how to I make a button a link?


zachary

Recommended Posts

Or you can do like the one below:

<html><head><title>Button Link</title><script Language="javascript">function link() 	{  window.location = "http://www.somesite.com";	}</script></head><body><form><input type="button" name="button" value="Click Button" onclick="link()"></form></body></html>

Link to comment
Share on other sites

You can also make a pretty convincing button out of a normal anchor tag:

.menu_item    {      background-color: #B0B0B0;      color: #600000;      font-size: 11px;      font-weight: bold;      font-family: sans-serif;      border: 2px outset #000000;      padding: 2px;      display: block;    }    .menu_item:hover    {      background-color: #C1BCB1;      color: #FFFFFF;      border: 2px inset #000000;    }

<div style="width: 150px;"><a href="menu.php" class="menu_item" id="menu_item_home">Home</a></div>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...