UK[dɪsˈeɪbld] US[dɪsˈebəld]
adj. Disabled, defective
v. To make incapable (the past tense and past participle of disable); to make disabled; to make Disable; render ineffective
javascript disabled attribute syntax
Function:Set or return whether to disable the button.
Syntax: buttonObject.disabled=true|false
javascript disabled attribute example
<html> <head> <script type="text/javascript"> function alertId() { var txt="Id: " + document.getElementById("myButton").id txt=txt + ", type: " + document.getElementById("myButton").type alert(txt) document.getElementById("myButton").disabled=true } </script> </head> <body> <form> <button id="myButton" onClick="alertId()">请点击我!</button> </form> </body> </html>
Click the "Run instance" button to view the online instance