HTML DOM disabled 屬性
定義和用法
disabled 屬性可設(shè)置或返回是否禁用密碼域。
語法
passwordObject.disabled=true|false
實例
下面的例子僅用了該密碼域:
<html>
<head>
<script type="text/javascript">
function disablePassword()
{
document.getElementById("password1").disabled=true
}
</script>
</head>
<body>
<form>
<input type="password" id="password1" />
<input type="button" id="button1" onClick="disablePassword()"
value="Disable password field" />
</form>
</body>
</html>