设置disabled属性为true即为不可用状态。
JS
1
|
document.getElementByIdx( "btn" ).disabled= true ;
|
jquery
1
|
$( "#btn" ).attr( "disabled" , true );
|
html
1
|
< input type = "button" value = "提交" id = "btn" >
|