type Property

MS Office DHTML, HTML & CSS

type Property


Retrieves the type of selection.

Syntax

HTMLN/A
Scripting[ sType = ] selection.type

Possible Values

sType String that specifies one of the following values:
noneNo selection/insertion point.
textText selection.
controlControl selection.

The property is read-only with no default value.

Remarks

The selection object is off the document object.

Example

This example uses the type property to create an alert that indicates the type of object selected by the user. If the user drags the mouse pointer over the text "Some text", the alert reads "Text". If the user drags the mouse pointer over the space to the right of the text, the alert reads "None".

Sample Code

<BODY onclick="alert(document.selection.type)">
Some text.

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
HTML N/A
Scripting selection

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.