You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > MozUserInput

MozUserInput style property

Browser support:
Specifies or retrieves whether the element can have the input focus.
Typically used for input elements to enable or disable them. This property is the same as the user-input property in the CSS3 declaration.
Use the readOnly property instead.


You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -moz-user-input

Possible values:

The type of this property is string.
 One of the following values: 
Default. Use the element's default behavior for user-input behavior.
Element is disabled and will not respond to user input.
Element can respond to user input.
Takes the value of this property from the computed style of the parent element.
The element is considered to be neither enabled nor disabled.
Default: auto.

Example HTML code 1:

This example illustrates the use of the -moz-user-input property:
        .example {
            -moz-user-input: disabled;
    <textarea class="example">The user is not able to change this text.</textarea>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the MozUserInput property in JavaScript:
    <script type="text/javascript">
        function ChangeUserInput (selectTag) {
            // Returns the index of the selected option
            var whichSelected = selectTag.selectedIndex;

            // Returns the text of the selected option
            var modifyState = selectTag.options[whichSelected].text;

            var textArea = document.getElementById ("myArea");

            if ('MozUserInput' in {
       = modifyState;
            } else {
                alert ("Your browser doesn't support this example!");
    <textarea id="myArea">Change user input ability</textarea>

    <select onchange="ChangeUserInput (this);" size="5">
        <option selected="selected" />auto
        <option />enabled
        <option />disabled
        <option />inherit
        <option />none
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content