Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

How to create an HTML button that acts like a link

<!-- VIA HTML -->

<form action="https://google.com">
    <input type="submit" value="Go to Google" />
</form>

<!-- VIA CSS -->

<a href="https://google.com" class="button">Go to Google</a>
a.button {
    -webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;

    text-decoration: none;
    color: initial;
}


<!-- VIA JAVASCRIPT -->

<input type="button" onclick="location.href='https://google.com';" value="Go to Google" />
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #create #HTML #button #acts #link
ADD COMMENT
Topic
Name
6+4 =