HIDEFOCUS attribute
Specifies whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
This attribute has effect only for the focus rectangle.
- If you want prevent the user from interacting with the object, use the DISABLED attribute.
- If you want prevent the contents of the object from being changed, use the READONLY attribute.
- In Firefox, Opera, Google Chrome and Safari, you can use the outline style property with a value of 'none' for similar functionality.
JavaScript page for this attribute: hideFocus. You can find other example(s) there. |
Possible values:
This attribute has no values.
Specifying the HIDEFOCUS attribute with an arbitrary value has the same effect as specifying it with no value.
For example, all of the following declarations have the same effect: hidefocus, hidefocus="true", hidefocus="false", hidefocus="on", hidefocus="hidefocus".
Although Boolean attributes may be used with no value in HTML, for XHTML compatibility, always use the HIDEFOCUS attribute in the following format: hidefocus="hidefocus".
Specifying the HIDEFOCUS attribute with an arbitrary value has the same effect as specifying it with no value.
For example, all of the following declarations have the same effect: hidefocus, hidefocus="true", hidefocus="false", hidefocus="on", hidefocus="hidefocus".
Although Boolean attributes may be used with no value in HTML, for XHTML compatibility, always use the HIDEFOCUS attribute in the following format: hidefocus="hidefocus".
Example HTML code 1:
This example illustrates the use of the hideFocus attribute:
|
||||
Use the TAB key to see the difference between the two buttons <button>Button With Rectangle</button> <button hidefocus="hidefocus">Button Without Rectangle</button> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, applet, area, b, bdo, big, blockQuote, body, button, caption, center, cite, code, col, colGroup, dd, del, dfn, dir, div, dl, dt, em, embed, fieldSet, font, form, frameSet, H1, H2, H3, H4, H5, H6, hr, i, iframe, img, input:button, input:checkbox, input:file, input:hidden, input:image, input:password, input:radio, input:reset, input:submit, input:text, ins, isIndex, kbd, label, legend, li, listing, marquee, menu, nobr, noFrames, object, ol, p, plainText, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, tBody, td, textArea, tFoot, th, tHead, tr, tt, u, ul, var, xmp
Related pages:
External links:
User Contributed Comments