User Tools

Site Tools


java:howtomakealinklooklikeabutton
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
java:howtomakealinklooklikeabutton [2022/12/02 22:02] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== How to make a link look like a button ======
 +
 +From time, appears the need of making a link to look like a button. If you search through internet you will see lots of solutions, however, it is surprising that nobody have came across this solution. If you have a link: 
 +
 +<code html>
 +  <a href="http://www.example.com">Please click here</a>
 +</code>
 +
 +The corresponding button that does __exactly the same behaviour__ is this: 
 +
 +<code html>
 +  <form method="GET" action="http://www.example.com">
 +  <input type="submit" name="Please click here">
 +  </form>
 +</code> 
 +
 +This solution has the advantage that every style you will apply to buttons in general will affect to this (because is a fucking real button, not an styled one). The "GET" method means exactly this: make a link with the values of the parameters and navigate through it. So, putting zero parameters make the result equivalent to click on a link. 
 +
  
java/howtomakealinklooklikeabutton.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1