HBCMS更多的中文手册参考:

grayScale Attribute | GrayScale参数属性

DHTML文档教程

Sets or retrieves the value that indicates whether content is displayed as the average of the RGB component values.

dhtml语法

HTML
{ filter:progid:dximagetransform.microsoft.basicimage(
    grayscale = bgray ... ) ... }
scripting
object.filters.item(
    "dximagetransform.microsoft.basicimage").grayscale [ = bgray ]

dhtml可能的值

bGrayBoolean that specifies or receives one of the following values:
1Display content as the grayscale average of the RGB values.
0Default. Display content with normal RGB values.

The property is read/write. The property has a default value of 0.

DHTML代码范例

This sample sets the BasicImage filter to display the content of a DIV element in grayscale.

<!-- This DIV is the target container for an image.  -->
<DIV ID="oDiv" STYLE="position:absolute; left:270px;" >
An Image - >
<IMG SRC='../common/earglobe.gif' />
</DIV>
<BUTTON onclick="oDiv.style.filter=
'progid:DXImageTransform.Microsoft.BasicImage(grayScale=1)'">
Gray</BUTTON><BR/>
<BUTTON onclick="oDiv.style.filter=''">Clear Filter</BUTTON><BR/>

Applies To

BasicImage