Using the image as a reset button

I want to use the image as a reset button, what code should I use in HTML and CSS?

+3
source share
2 answers

Think this should do the trick.

 <button type="reset">
    <img src="#" alt="" />
 </button>
+7
source
Good question. Unable to do AFAIK. Images can only serve as submit buttons. You will need to use Javascript to create onclick="this.form.reset()"on a regular image or create a regular reset button using a background image (should be possible without problems).
+4
source

Source: https://habr.com/ru/post/1727138/


All Articles