How do I perform an action immediately after an <input type="reset"/>
has already reset the form elements?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
Write code/events which you wanted to call in middle of this function. I have tested this. Working good.
Forms have a
reset
event that you can listen for.Of course, it's bad practice to add javascript handlers this way, so you'd want to use
.addEventListener/.attachEvent
orjQuery.bind()
, but you get the idea.Try :
You always can use jQuery, or do some tricks with form reset event itself.