您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

当在HTML中点击表单中的重置按钮时执行脚本?

2025/8/5 9:27:46发布25次查看
当表单被重置时,onreset 属性会触发。您可以尝试运行以下代码来实现onreset属性 −
示例<!doctype html><html> <body> <form onreset = "display()"> student name:<br> <input type = "text" name = "sname"> <br> student subject:<br> <input type = "text" name = "ssubject"> <br> <input type = "reset" value = "reset"> </form> <script> function display() { alert("form reset successfull!"); } </script> </body></html>
以上就是当在html中点击表单中的重置按钮时执行脚本?的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product