这个是调用系统自带的调色板
[CODE]<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>(IE5.5+)</title>
</head>
<body>
<SCRIPT>
var sInitColor = null;
function callColorDlg()
{
if (sInitColor == null)
var sColor = dlgHelper.ChooseColorDlg();
else
var sColor = dlgHelper.ChooseColorDlg(sInitColor);
sColor = sColor.toString(16);
if (sColor.length < 6)
{
var sTempString = "000000".substring(0,6-sColor.length);
sColor = sTempString.concat(sColor);
}
ofntColor.style.color=sColor;
alert(sColor);
}
</SCRIPT>
<OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></OBJECT>
<BUTTON ID="ofntColor" onclick="callColorDlg()">Choose Font color</BUTTON>
</body>
</html> [/CODE]
[此贴子已经被作者于2007-3-2 11:27:38编辑过]