EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

isDisabled property

Gets the value that indicates whether the user can interact with the object.

Syntax

JavaScript

p = object.isDisabled

Property values

Type: Boolean

false (false)

User can interact with the object.

true (true)

User cannot interact with the object.

Examples

The following example shows how to use the isDisabled property to determine whether an object is disabled.


<head>
<script type="text/javascript">
function chgInput() {
    currentState = oTextInput.isDisabled;
    newState = !currentState;
    oTextInput.disabled = newState;
    oCurrentValue.innerText = newState;
    newState==true ? oBtn.innerText="Enable" : oBtn.innerText="Disable"
}
</script>
</head>
<body onload="oCurrentValue.innerText = oTextInput.isDisabled;">
<p>Click the button to enable or disable the <b>input</b>.</p>
<p>
<input id="oBtn" type="button" value="Disable" onclick="chgInput()" />
</p>
<p><input id="oTextInput" valie="This is some text." /></p>
Input disabled: <spam id="oCurrentValue"></span>
</body>

See also

a
abbr
address
area
article
aside
b
base
bdo
bgSound
blockQuote
body
br
button
caption
cite
code
col
colGroup
comment
custom
dd
del
dfn
div
dl
dt
em
embed
fieldSet
figcaption
figure
footer
form
frame
head
header
hgroup
hn
hr
html
i
iframe
img
input type=button
input type=checkbox
input type=email
input type=file
input type=hidden
input type=image
input type=number
input type=password
input type=radio
input type=range
input type=reset
input type=search
input type=submit
input type=tel
input type=text
input type=url
ins
kbd
label
legend
li
link
map
mark
menu
nav
object
ol
option
p
pre
q
rt
ruby
s
samp
script
section
select
small
span
strong
sub
sup
table
tBody
td
textArea
tFoot
th
tHead
title
tr
u
ul
var

 

 

Anzeigen:
© 2014 Microsoft. Alle Rechte vorbehalten.