编辑下面的代码:【加编码】
<html> <body> <p>Enter some text in the fields below, then press the Reset button to reset the form.</p> <form onreset="alert('The form will be reset')"> Firstname: <input type="text" name="fname" value="Donald"><br> Lastname: <input type="text" name="lname" value="Duck"> <br><br> <input type="reset" value="Reset"> </form> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂