![]() |
Definition and Usage
The Applies to
The
Browser Support
|
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<p>When you reset the form, a function is triggered which alerts some text.</p>
<form onreset="myFunction()"> Enter name: <input type="text"> <input type="reset">
</form>
<script>
function myFunction() { alert("The form was reset");
}
</script>
</body>
</html>
html onreset attribute |
How to Execute a JavaScript when the Reset button in a form is clicked - HTML onreset Attribute | HTML Attribute |
Type
: |
Develop |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Attribute |
Uploaded by
: |
Admin |
Read Article https://horje.com/learn/1434/reference