编辑下面的代码:【加编码】
<html> <body> <p>当表单被重置后,触发函数并弹出提示信息。</p> <form onreset="myFunction()"> 输入您的名字: <input type="text"> <input type="reset"> </form> <script> function myFunction() { alert("表单已重置"); } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂