Could I have something like <INPUT TYPE="SUBMIT" NAME=submit VALUE=Submit>, but instead of being a submit button, it could be an image? Is there something like href?
Could I have something like <INPUT TYPE=SUBMIT NAME=submit VALUE=Submit> , but instead of being
Share
HTML already got it:
Clicking it is exactly like clicking a submit button, instead of
valueyou definesrcand the coordinates of the click are also sent to the server.Official documentation.
Edit – while the form submission itself is the same, there is one difference between
<input type="submit" />and<input type="image" />which is the value sent to the server for the clicked button. With ordinary submit button, the value of the button is sent alongside its name and can be then used to know if the form has been submitted, for example. In case of image input, each browser behaves differently, some send the value some send coordinates but you can’t rely on this anymore. So, if you depend on the submitted button value in the server side code using image button is not good idea.