You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > MozUserFocus
MozUserFocus style property
Specifies or retrieves whether the element can have focus.
This property is the same as the user-focus property in the CSS3 declaration.
Syntax:
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-focus |
Possible values:
The type of this property is string.
One of the following values:
Default. Use the default focus behavior for the element. | |||||||
Seems to be like 'none'. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
The element can not receive focus. | |||||||
Seems to be like 'auto'. |
Default: auto.
Example HTML code 1:
This example illustrates the use of the -moz-user-focus property:
|
||||
<head> <style> .example { -moz-user-focus: none; /* it doesn't seem to working so we need some workaround */ -moz-user-select: none; -moz-user-input: disabled; } </style> </head> <body> <input type="text" onfocus="alert ('Focus on 1. object')" value="Press tab to focus" /> <input type="text" onfocus="alert ('Focus on 2. object')" class="example" value="This element cannot receive focus" /> <input type="text" onfocus="alert ('Focus on 3. object')" value="Press tab to focus" /> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.style
HTML elements:
a, abbr, acronym, address, b, bdo, big, blink, blockquote, body, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, html, i, ins, isindex, kbd, label, legend, li, marquee, menu, ol, optgroup, option, p, pre, s, samp, small, span, strike, strong, sub, sup, table, td, textarea, th, tr, tt, u, ul, var
Related pages:
External links:
User Contributed Comments