Specifies that an element cannot be selected. dhtml语法 HTML |
<ELEMENT UNSELECTABLE=bUnselectable ... >
|
---|
Scripting | N/A |
---|
DHTML可能的值 bUnselectable | Specifies whether an element is prohibited from being selected.off | Default. Permits selection of the element. | on | Prohibits selection of the element. |
|
Remarks
Note Setting the UNSELECTABLE attribute to off does not ensure that the element is selectable. One example is an HTML Application (HTA) with the selection attribute set to no. elements in the body of the hta cannot be selected, whether the element's unselectable attribute is set to off or not. clicking on an element with the unselectable attribute set to on does not destroy the current selection if one exists. an element with the unselectable attribute set to on can be included in a selection that starts somewhere outside the element. the unselectable attribute is implemented as an expando. setting the expando property of the document object to false precludes the functionality of all expandos.
DHTML代码范例
This example shows that the UNSELECTABLE attribute is not inherited by child objects. Text in the TEXTAREA element can be selected and modified, but the text in the parent SPAN element cannot be selected.
<P>
<SPAN ID="oSpan" UNSELECTABLE="on" >This text cannot be selected.
<P>
<TEXTAREA WRAP="PHYSICAL" ROWS="5" STYLE="font-weight: bold;" ID="oTextarea">
This text can be selected and overwritten.
</TEXTAREA>
</P>
This text closes the SPAN and cannot be selected either.
</SPAN>
</P>
是否符合公共标准
There is no public standard that applies to this attribute.
Applies To |
A,
ACRONYM,
ADDRESS,
APPLET,
AREA,
B,
BDO,
BIG,
BLOCKQUOTE,
BODY,
BUTTON,
CAPTION,
CENTER,
CITE,
CODE,
CUSTOM,
DD,
DEL,
DFN,
DIR,
DIV,
DL,
DT,
EM,
EMBED,
FIELDSET,
FONT,
FORM,
FRAME,
FRAMESET,
hn,
HR,
I,
IFRAME,
IMG,
INPUT type=button,
INPUT type=checkbox,
INPUT type=file,
INPUT type=hidden,
INPUT type=image,
INPUT type=password,
INPUT type=radio,
INPUT type=reset,
INPUT type=submit,
INPUT type=text,
INS,
ISINDEX,
KBD,
LABEL,
LEGEND,
LI,
LISTING,
MARQUEE,
MENU,
nextID,
NOBR,
OBJECT,
OL,
P,
PLAINTEXT,
PRE,
Q,
RT,
RUBY,
S,
SAMP,
SELECT,
SMALL,
SPAN,
STRIKE,
STRONG,
SUB,
SUP,
TABLE,
TBODY,
TD,
TEXTAREA,
TFOOT,
THEAD,
TT,
U,
UL,
VAR,
XMP | |
更多语法参考 modifying documents in edit mode, onselect, select for input controls, Select for textRange and controlRange collections
|