防止按钮重复点击
demo
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <html> <head> <script type="text/javascript"> function disable() { document.getElementById('b').disabled = true; } function enable() { document.getElementById('txt1').disabled = false; } </script> </head> <body> <textarea id="txt1">Hello world....This is a text area</textarea> <br /> <input id="t" type="button" onclick="disable()" value="Disable" /> <input id="b" type="button" onclick="enable()" value="Enable" /> </body> </html>
内容仅供参考,并非百分百解决您的问题。