javascript 锁住按钮的方法
<html> <head> <script language="javascript"> function closeclick() { document.getElementById("btn1").disabled = true; } function openclick() { document.getElementById("btn1").disabled = false; } </script> </head> <body> <input type="button" id="btn1" value="button1" onClick="closeclick()"/> <input type="button" id="btn2" value="button2" onClick="openclick()"/> </body> <html>
只需控制ture和false就能控制按钮的开关