<!DOCTYPE html>
<html lang="en-US">
<body>
<p>Type something and click on reset button</p>
<form onreset="myFunction()">
Name: <input type="text">
<input type="reset">
</form>
<script>
function myFunction(){
alert("Form is reset");
}
</script> </body>
</html>