![]() |
Definition and UsageThe Applies toThe
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 |
Read Full: | HTML Attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Views: | 45 |
Reffered: https://www.w3schools.com/tags/att_onreset.asp