HBCMS更多的中文手册参考:

SELECTION Attribute | selection参数属性

DHTML文档教程

Sets or retrieves whether the content can be selected with the mouse or keyboard.

dhtml语法

HTML<HTA:APPLICATION SELECTION = sSelection... >
Scripting[ sSelection = ] HTA:APPLICATION.selection

DHTML可能的值

sSelectionStringthat specifies one of the following values.
yesDefault. Content can be selected with the mouse or keyboard.
noContent cannot be selected with the mouse or keyboard.

The property is read-only. The property has a default value of yes.

Remarks

Note  The selection property is read only, however the SELECTION attribute can be used to set the initial value.

Setting the SELECTION attribute to no prevents the context menu from displaying. Setting the contextmenu attribute to yes has no effect in this case.

Note   The use of content editable elements overrides the selection property. When the contentEditable property is set to true anywhere in an HTML Application (HTA), any object may be selected.

DHTML代码范例

This example shows how to retrieve the selection property.

<HTML>
<HEAD>
<HTA:APPLICATION
ID=oHTA
CONTEXTMENU="yes"
SELECTION="no"/>
<TITLE>HTA Properties</TITLE>
<STYLE>
BODY {font-size: 8pt; font-family: Arial;}
</STYLE>
</HEAD>
<SCRIPT>
function readFun()
{
alert("The selection property is set to:  " + oHTA.selection);
}
</SCRIPT>
<BODY>
<P>Read the property:
<INPUT TYPE="button"  VALUE="Test selection value" onClick="readFun()"/>
</P>
</BODY>
</HTML>

是否符合公共标准

There is no public standard that applies to this property.

Applies To

HTA:APPLICATION

更多语法参考

contentEditable