JSP页面颜色选择控件

来源:百度知道 编辑:UC知道 时间:2024/06/01 19:43:43
怎么样在JSP页面中添加一个颜色选择控件来控制字体的颜色啊!大家帮帮忙啊!我知道在JAVA中有一个changecolor控件,可是在JSP上用什么啊?
tolys兄,我的邮箱是he8523@yahoo.com.cn谢谢帮忙!我想要的效果是可以打开颜色选择面板的!

<html>
<head>
<SCRIPT>
function fnInit(){
for (i=0; i<document.all.length; i++)
document.all(i).unselectable = "on";
}
var sInitColor = null;
function callColorDlg(){
if (sInitColor == null)
//display color dialog box
var sColor = dlgHelper.ChooseColorDlg();
else
var sColor = dlgHelper.ChooseColorDlg(sInitColor);
//change decimal to hex
sColor = sColor.toString(16);
//add extra zeroes if hex number is less than 6 digits
if (sColor.length < 6) {
var sTempString = "000000".substring(0,6-sColor.length);
sColor = sTempString.concat(sColor);
}
//change color of the text in the div
oDiv.style.color= sColor;
sInitColor = sColor;

}
</SCRIPT>
</HEAD>
<BODY onload="fnInit();">

<H1>Choose Font Colors Sample</H1>
<DIV CLASS=&