HBCMS更多的中文手册参考:

type参数属性

DHTML文档教程

Retrieves the type of selection.

dhtml语法

[ sType = ] selection.type

DHTML可能的值

sTypeString that receives one of the following values.
noneNo selection/insertion point.
textSpecifies a text selection.
controlSpecifies a control selection, which enables dimension controls allowing the selected object to be resized.

The property is read-only. The property has no default value.

Remarks

The selection object is off the document object.

DHTML代码范例

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

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

是否符合公共标准

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

selection