Javascript examples for DOM Event:onreset
The onreset event occurs when a form is reset.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Supported HTML tags: | <form> |
<!DOCTYPE html> <html> <body> <form onreset="myFunction()"> Enter name: <input type="text"> <input type="reset"> </form>/*www . jav a2s .co m*/ <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = "The form was reset"; } </script> </body> </html>