 <script type="text/javascript">
<script type="text/javascript"> function MyColor(name,r,g,b){
function MyColor(name,r,g,b){ this.name=name;
this.name=name; this.red=r;
this.red=r; this.green=g;
this.green=g; this.blue=b;
this.blue=b; }
} MyColor.prototype.hexValue=function(){
MyColor.prototype.hexValue=function(){ var hR=this.red.toString(16);
var hR=this.red.toString(16); var hG=this.green.toString(16);
var hG=this.green.toString(16); var hB=this.blue.toString(16);
var hB=this.blue.toString(16); return "#"+(this.red<16?("0"+hR):hR)+(this.green<16?("0"+hG):hG)+(this.blue<16?("0"+hB):hB);
return "#"+(this.red<16?("0"+hR):hR)+(this.green<16?("0"+hG):hG)+(this.blue<16?("0"+hB):hB); };
}; var CnLeiColor=new MyColor("red",255,0,0);
var CnLeiColor=new MyColor("red",255,0,0); alert(CnLeiColor.hexValue());
alert(CnLeiColor.hexValue()); </script>
</script>
 
                     
                    
                 
                    
                 
 
        

 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号