# BackColor Property The BackColor property contains the color for the background of the StaticText. Syntax
    document.all["id_name"].BackColor [=color]
Possible Values
    ColorValue that specifies or retrieves the background color.
The property is read/write. Remarks Note that the BackStyle property should not be 0 for the BackColor property if it is to take any effect. ColorValue: An RGB (Red, Green, Blue) 32-bit color value that defines a solid color. Each of the Red, Green, Blue portions represents the color intensity between 0 and 255 (or 0x00 to 0xff hexadecimal). The RGB color value can be calculated: ColorValue = Red + Green*256 + Blue*65536. Please note that this representation differs from HTML color values, which are hexadecimal RRGGBB. Examples The following example changes the BackColor property on a mouse click.
    <html>
    <head>
    <SCRIPT TYPE="text/javascript">
    function changeBackColor()
    {
    	if(document.all["id_StaticText"].BackColor == 65280)
    	{
    		document.all["id_StaticText"].BackColor = 255;
    		document.all["id_StaticText"].Text =
    		document.all["id_StaticText"].Text;
    	}
    	else
    	{
    		document.all["id_StaticText"].BackColor = 65280;
    		document.all["id_StaticText"].Text =
    		document.all["id_StaticText"].Text;
    	}
    }
    </SCRIPT>
    </head>
    <body>
    <OBJECT id="id_StaticText" width="170" height="12"
    style="padding:0; margin:0; display:inline;"
    classid="CLSID:2D6F85AB-07AB-4417-85E3-7F2400474A63">
    	<PARAM NAME="BackStyle" VALUE="1">
    	<PARAM NAME="BackColor" VALUE="255">
    	<PARAM NAME="FontName" VALUE="Times New Roman">
    	<PARAM NAME="FontSize" VALUE="8.00">
    	<PARAM NAME="FontBold" VALUE="0">
    	<PARAM NAME="FontItalic" VALUE="0">
    	<PARAM NAME="FontUnderline" VALUE="0">
    	<PARAM NAME="FontWeight" VALUE="500">
    	<PARAM NAME="ForeColor" VALUE="0">
    	<PARAM NAME="Text" VALUE="Default text if necessary">
    </OBJECT>
    <div onclick="changeBackColor()">Click!</div>
    </body>
    </html>
Applies to SiteKiosk v5.0 (and later versions). Back to top