The onreset event is useful when a form is reset. You can try to run the following code to learn how to implement onreset event in JavaScript −
Example
<!DOCTYPE html>
<html>
<body>
<script>
function resetFunct() {
alert("The form was reset");
}
</script>
<form onreset = "resetFunct()">
Enter age: <input type = "number"><br>
Enter birth month: <input type = "text"><br>
<input type = "reset">
</form>
</body>
</html>