hur kommer jag åt värdena för anpassade färger, hur spar jag dom för att återanvända dom så länge man inte lämnar sidan.
har försökt hitta nåt om detta på microsoft sidan men blir bara så trött på den när man sitter med modem.
nån som vet??
Eller vet nån var jag kan läsa mer om detta?
<HTML>
<HEAD>
<script>
//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);
}
alert (sColor);
//set the initialization color to the color chosen
sInitColor = sColor;
document.bgColor=sColor;
}
</script>
</HEAD>
<BODY>
<OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="10px" height="10px">
</OBJECT>
Show Me
<a href="#" onclick="callColorDlg()">colordialog</a>
</BODY>
</HTML>