可以参考dojo的DatePicker,。

解决方案 »

  1.   

    JUST FOR IE<script>
    function colorpicker()
     {
        var sColor_tmp,sColor,color_len;
        sColor_tmp=dlgHelper.ChooseColorDlg().toString(16);
        color_len = sColor_tmp.length;
        switch(color_len){
                    case 1:
                        sColor = "00000"+sColor_tmp.toString();
                        break;
                    case 2:
                        sColor = "0000"+sColor_tmp.toString();
                        break;
                    case 3:
                        sColor = "000"+sColor_tmp.toString();
                        break;
                    case 4:
                        sColor = "00"+sColor_tmp.toString();
                        break;
                    case 5:
                        sColor = "0"+sColor_tmp.toString();
                        break;
                    default:
                        sColor = sColor_tmp.toString();
                        break;
                
                }
        color.value='#'+sColor; 
        color.style.backgroundColor='#'+sColor;
    }
    </script><style type="text/css">
    <!--
    body {
     margin-left: 0px;
     margin-top: 0px;
     margin-right: 0px;
     margin-bottom: 0px;
    }
    -->
    </style>
    <OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" WIDTH="0px" HEIGHT="0px"></OBJECT><table width="100%" height="100%">
    <tr><td width="100%" height="100%" align="center">
    <input type="text" id='color' name="color" value="" onmouseover="colorpicker()"></td>
    </tr></table>
      

  2.   

    好了,我自己解决了,谢谢你哦,我最终要的效果代码如下:<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <script>
    function colorpicker()
     {
        var sColor_tmp,sColor,color_len;
        sColor_tmp=dlgHelper.ChooseColorDlg().toString(16);
        color_len = sColor_tmp.length;
        switch(color_len){
                    case 1:
                        sColor = "00000"+sColor_tmp.toString();
                        break;
                    case 2:
                        sColor = "0000"+sColor_tmp.toString();
                        break;
                    case 3:
                        sColor = "000"+sColor_tmp.toString();
                        break;
                    case 4:
                        sColor = "00"+sColor_tmp.toString();
                        break;
                    case 5:
                        sColor = "0"+sColor_tmp.toString();
                        break;
                    default:
                        sColor = sColor_tmp.toString();
                        break;
                
                }
        document.form1.color.value='#'+sColor; 
        document.form1.color.style.backgroundColor='#'+sColor;
    }
    </script><style type="text/css">
    <!--
    body {
     margin-left: 0px;
     margin-top: 0px;
     margin-right: 0px;
     margin-bottom: 0px;
    }
    .border {
    border-top-width: 0px;
    border-right-width: 0px;
    border-bottom-width: 0px;
    border-left-width: 0px;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    background-color: #6AB5FF;
    }
    -->
    </style>
    </head><body>
    <OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" WIDTH="0px" HEIGHT="0px" style="margin-left:200px; margin-left:300px;"></OBJECT>
    <form name="form1" action="" method="post">
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr><td height="50">&nbsp;</td>
    <td height="50">&nbsp;</td>
    </tr>
    <tr><td align="right">
    <input name="color" type="text" class="border" id='color' value="#ff80c0" size="10" readonly="readonly">
    </td>
    <td><input type="button" onclick="colorpicker()" value="选择颜色" /></td>
    </tr>
    <tr><td height="50" colspan="2" align="center">
      <label>
      <input type="submit" name="button" id="button" value="提交" />
      </label>
    </td>
    </tr>
    </table></form>
    <div align="center">你选择的颜色是:
    <% =request.Form("color")
    %></div>
    </body>
    </html>