CONTEXTMENU Attribute | contextMenu参数属性
| DHTML文档教程 |
Sets or retrieves whether the context menu is displayed when the right mouse button is clicked.
dhtml语法
HTML | <HTA:APPLICATION CONTEXTMENU
= sContextMenu... >
|
---|
Scripting | [ sContextMenu = ] HTA:APPLICATION.contextMenu |
---|
DHTML可能的值
sContextMenu | Stringthat specifies one of the following values. yes | Default. Context menus are displayed. | no | Context menus are not displayed. |
|
The property is read-only.
The property has a default value of
yes.
Remarks
Note The contextMenu property is read only, however the CONTEXTMENU attribute can be used to set the initial value.
DHTML代码范例
This example shows how to retrieve the contextMenu property.
<HTML>
<HEAD>
<HTA:APPLICATION
ID=oHTA
CONTEXTMENU="no"
/>
<TITLE>HTA Properties</TITLE>
<STYLE>
BODY {font-size: 8pt; font-family: Arial;}
</STYLE>
</HEAD>
<SCRIPT>
function readFun()
{
alert("The contextMenu property is set to: " + oHTA.contextMenu);
}
</SCRIPT>
<BODY>
<P>Read the property:
<INPUT TYPE="button" VALUE="Test contextMenu value" onClick="readFun()"/>
</P>
</BODY>
</HTML>
是否符合公共标准
There is no public standard that applies to this property.
Applies To