travisowens Posted March 11, 2008 Posted March 11, 2008 (edited) I have a page where I have <button> tags and I simply wrap them inside <a href> but TIDY says this is not legit. What's the correct way to do the following: <a href="?action=go"><button>GO</button></a> The W3C doesn't mention anything either: http://www.w3schools.com/tags/tag_button.asp Technically, the traditional way to do this, which works fine but is very verbose is: <form style="display: inline;"><input type="hidden" name="action" value="go"><input type="submit"></form> but as you have more GET values to push, this gets very long (I already have 3 in my real code). I'm just looking for a cleaner & more elegant way to achieve this. Edited March 11, 2008 by travisowens Quote Experience is something you don't get until just after the moment you needed it
travisowens Posted March 11, 2008 Author Posted March 11, 2008 (edited) The following syntax is legit but it then the button no longer goes anywhere. <button><a href="?action=go">GO</a></button> Edited March 11, 2008 by travisowens Quote Experience is something you don't get until just after the moment you needed it
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.