源:flash,as,js兴趣爱好者rgb颜色选择器,html颜色选择器
rgb颜色选择器,html颜色选择器
<!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=utf-8" /> <link rel="stylesheet" type="text/css" href="color-min.css" /> <meta name="description" content="HTML色彩代码 网站提供一件有关于色彩方面的免费工具,来帮助您查找贵站中的 HTML色彩。功能卓越的HTML色彩表格工具和HTML色彩提取利器让这个过程易如反掌。" /> <META NAME="keywords" content="html, color, codes, chart, picker, hex"> </head> <body> <div class="bodybg"> <div class="bg"> <div class="bg1"> <div class="top font18"><strong>HTML色彩代码</strong></div> <div id="insertcolor"> 插入您的色彩代码: <input type="text" name="startcolor" id="startcolor" value="FFFFFF" maxlength="7"> <button id="newcolor">查看</button> </div> <div id="container"></div> <script type="text/javascript" src="yui-min.js"></script> <script type="text/javascript" language="javascript"> (function() { var Event = YAHOO.util.Event, picker, hexcolor; Event.onDOMReady(function() { picker = new YAHOO.widget.ColorPicker("container", { showhsvcontrols: true, showhexcontrols: true, showwebsafe: false }); picker.skipAnim=true; var onRgbChange = function(o) { setTimeout ("document.getElementById('yui-picker-hex').select()", 50); } picker.on("rgbChange", onRgbChange); Event.on("newcolor", "click", function(e) { hexcolor = cc(document.getElementById('startcolor').value); picker.setValue([HexToR(hexcolor), HexToG(hexcolor), HexToB(hexcolor)], false); }); }); })(); </script> </div> </div> </div> <script src="monitor.js"></script> <script> baidu.app.autoHeight(); </script> </body> </html>