<thead id="toltr"></thead>
<progress id="toltr"><strike id="toltr"></strike></progress>

  • <ul id="toltr"><meter id="toltr"></meter></ul>
    <b id="toltr"></b>

    <strike id="toltr"></strike>

    <b id="toltr"></b>

  • 歡迎進入紅數(shù)信息技術(shù)有限公司官網(wǎng)
    4008088160
    現(xiàn)在的位置:首頁 > 發(fā)布網(wǎng)絡(luò)推廣公司-營銷推廣 > 有關(guān)RGB色彩在線轉(zhuǎn)換的方法代碼
    有關(guān)RGB色彩在線轉(zhuǎn)換的方法代碼
    信息來源:湖南優(yōu)度網(wǎng)絡(luò)公司  發(fā)布日期:2011/3/4 瀏覽數(shù)量:995
    文章導讀: ...

    有關(guān)RGB色彩在線轉(zhuǎn)換的方法如下:

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title>標題頁</title>
    <SCRIPT LANGUAGE="JavaScript">
    function showRGB(f)
    {
    //獲取用戶輸入的RGB值
    red = f.red.value;
    green = f.green.value;
    blue = f.blue.value;
    //將RGB轉(zhuǎn)換為16進制Hex值
    hexcode = "#" +toHex(red) + toHex(green) + toHex(blue);
    document.bgColor  = f.hexval.value = hexcode;
    }
    function toHex(d){
    if (isNaN(d)){
    d=0;
    }
    //16進制轉(zhuǎn)換方法
    var n=new Number(d).toString(16);
    return (n.length==1?"0"+n:n);
    }
    </script>
    </head>
    <body>
    <form name="rgbform">
    <b>請輸入RGB顏色值(0 to 255)</b><br>
    Red:   <input type="text" name="red" size="5"><br>
    Green: <input type="text" name="green" size="5"><br>
    Blue:  <input type="text" name="blue" size="5"><br>
    <input type="button" value="顯示Hex #" onClick="showRGB(this.form)">
    Hex值為:  <input type="text" name="hexval" size="7">
    </form>
    </body>
    </html>

    相關(guān)信息
    • 網(wǎng)絡(luò)營銷培訓
    • 微網(wǎng)站
    • 掃二維碼
    • 1
    • 2
    • 3
    • 最新上傳
    • 精品案例
    18973218026
    其他業(yè)務(wù)合作請發(fā)下面郵箱
    郵箱:254596208@qq.com
    地址:湖南省湘潭市岳塘區(qū)霞光東路58號(維也納酒店6樓)
    營銷型網(wǎng)站建設(shè)掃一掃關(guān)注官方微信

    關(guān)注優(yōu)度

    官方微信
    官方微博
    官網(wǎng)首頁
    亚洲日本中文字幕天天跟新,无码综合黄色在线,亚洲人成网站在线观看无码,久久久久亚洲无码
    <thead id="toltr"></thead>
    <progress id="toltr"><strike id="toltr"></strike></progress>

  • <ul id="toltr"><meter id="toltr"></meter></ul>
    <b id="toltr"></b>

    <strike id="toltr"></strike>

    <b id="toltr"></b>