最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ChooseColorDlg Method

Internet Development Index

Opens the system color-selection dialog box.

Syntax

rgbColor = Dialog Helper.ChooseColorDlg( [initColor])

Parameters

initColor Optional. Variant that specifies the RGB value of the initial color selected in the color-selection dialog box. The value is specified as 0xrrggbb where rr is the red hex value, gg is the green hex value, and bb is the blue hex value. For a complete list of colors, see Color Table.

Return Value

A Variant that specifies the decimal value of the color chosen in the color-selection dialog box. The value must be converted to its hexadecimal equivalent and is specified as 0xrrggbb.

Remarks

There is no way to persist custom colors in this dialog box.

The return value of this method must be converted from decimal to hexadecimal before it can be used to change an object's color. In addition, the hexadecimal number must contain six digits to represent the RRGGBB schema required by the color table. For numbers with less than six numbers, concatenate zeros to the beginning of the number. For more information, see the Color Table.

Example

The following example shows how to call the color dialog box. The return value of the method is converted to a hexadecimal value and applied to the font color.

//This variable needs to have global scope for the callColorDlg function to persist the chosen color
var sInitColor = null;
function callColorDlg(){
//if sInitColor is null, the color dialog box has not yet been called
if (sInitColor == null)
var sColor = dlgHelper.ChooseColorDlg();
else
//call the dialog box and initialize the color to the color previously chosen
var sColor = dlgHelper.ChooseColorDlg(sInitColor);
//change the return value from a decimal value to a hex value and make sure the value has 6
//digits to represent the RRGGBB schema required by the color table
sColor = sColor.toString(16);
if (sColor.length < 6) {
var sTempString = "000000".substring(0,6-sColor.length);
sColor = sTempString.concat(sColor);
}
document.execCommand("ForeColor", false, sColor);
//set the initialization color to the color chosen
sInitColor = sColor;
}
This feature requires Microsoft® Internet Explorer 6.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Applies To

Dialog Helper
陆川县| 宁德市| 工布江达县| 南澳县| 堆龙德庆县| 清水河县| 广丰县| 东莞市| 长岛县| 隆化县| 青海省| 红安县| 兴和县| 建阳市| 阿巴嘎旗| 边坝县| 平和县| 高尔夫| 海晏县| 北京市| 泰兴市| 义马市| 石家庄市| 舒兰市| 池州市| 惠来县| 衡东县| 黄石市| 武宣县| 新津县| 冕宁县| 祁东县| 商都县| 宜州市| 邓州市| 巴林右旗| 沧源| 阿图什市| 博乐市| 和静县| 衡阳县|