Click to return to the DHTML, HTML     
status Property     STYLE Attribute     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

status Property


Sets or retrieves whether the check box or radio button is selected.

Syntax

HTMLN/A
Scriptingobject.status [ = bStatus ]

Possible Values

bStatus Boolean that specifies one of the following values:
falseControl is not selected.
trueControl is selected.

The property is read/write with a default value of false.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see Dynamic Properties.

Example

This example uses the status property to control a check box that is disabled by default.

Sample Code

<INPUT ID=oCheckbox TYPE=checkbox CHECKED DISABLED>
:
<SPAN onclick="oCheckbox.status=false" 
    STYLE="font-weight:bold">I disagree</SPAN>.
<SPAN onclick="oCheckbox.status=true" 
    STYLE="font-weight:bold">I agree</SPAN>.

This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
INPUT TYPE=checkbox, INPUT TYPE=radio


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.