<html> <head> <title>Reset From Using JavaScript</title> <script> function clean() { alert("Reset"); } </script> </head> <body> <form onreset="clean()"> Name < input type="text" value="text" > <input type="Reset" value="Reset"> </form> </body> </html>