How do I use an image as a submit button?

Use an image type input:

<input type="image" src="https://stackoverflow.com/Button1.jpg" border="0" alt="Submit" />

The full HTML:

<form id='formName' name="formName" onsubmit="redirect();return false;">
  <div class="style7">
    <input type="text" id='userInput' name="userInput" value="">
    <input type="image" name="submit" src="https://jekyllcodex.org/uploads/grumpycat.jpg" border="0" alt="Submit" style="width: 50px;" />
  </div>
</form> 

Leave a Comment