JavaScript Tutorial

adplus-dvertising
Onreset event In JavaScript
Previous Home Next

An event is perform onreset event to reset form if user want to reset a form than that's can use reset event

Example :

<html>
<body>
<p>You can reset a form </p>
<script>
function myFunction() {
    alert("your form is reset"); 
}
</script>
<form onreset="myFunction()">
  Enter name: <input type="text">
  <input type="reset">
</form>
</body>
</html>

Output :

Previous Home Next