<html> </head> <script> function clickTime() { var text_ = document.form.text_; text_.value++; var T = setInterval(() => { text_.value = "0"; clearInterval(T) }, 1000); if (text_.value == "3") { alert("点击了三次"); text_.value = "0"; } } </script> </head> <body onclick="clickTime()"> <form name="form" style="margin:20px auto;15px;height: 15px;"> <input type="button" name="text_" value=0 disabled style="margin:20px auto;28px;height: 20px;"> </form> </body> </html>