运行 ❯
建立您
自己的
网站
×
改变方向
保存代码
改变主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <p>Enter names in the fields below, then click "Reset" to reset the form.</p> <form id="frm1"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br><br> <input type="button" onclick="myFunction()" value="Reset"> </form> <script> function myFunction() { document.getElementById("frm1").reset(); } </script> </body> </html>