// Listen for any clicks on an element in the document with the `link` class$(document).on('click', '.link', function(e) {// Prevent the default action (e.g. submit the form)e.preventDefault();
// Get the URL specified in the formvar url = e.target.parentElement.action;window.location = url;});
<!DOCTYPE html><html><head><script src="https://code.jquery.com/jquery-1.11.1.min.js"></script><meta charset="utf-8"><title>Form buttons as links</title></head><body><!-- Set `action` to the URL you want the button to go to --><form method="get" action="http://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link"><!-- Add the class `link` to the button for the event listener --><button type="submit" class="link" role="link">Link</button></form></body></html>
There are many ways you can do this, but this is only three small examples of buttons that act like a link. In other words, buttons that open up links.