using image as reset button

孤街醉人 提交于 2019-12-12 16:12:12

问题


i want to use an image as reset button what code i should use in HTML and CSS ?


回答1:


Think this should do the trick.

 <button type="reset">
    <img src="#" alt="" />
 </button>



回答2:


Good question. Can't be done AFAIK. Images can only serve as submit buttons. You would have to use Javascript to do a onclick="this.form.reset()" on a normal image, or style a normal reset button using a background image (should be possible without problems).



来源:https://stackoverflow.com/questions/1994509/using-image-as-reset-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!