富贵资源网 Design By www.hznty.com
本文实例讲述了js实现的在线调色板功能。分享给大家供大家参考,具体如下:
运行效果图如下:
完整实例代码如下:
<html> <head> <meta http-equiv="content-Type" content="text/html;charset=utf-8"> <meta name="keywords" content="调色板" /> <meta name="description" content="调色板" /> <title>网页特效 网页取色器 站长特效网欢迎您。</title> </head> <body> <script type="text/javascript" src="/UploadFiles/2021-04-02/tc.js">tc.js代码如下:
var urls = new Array("http://tools.jb51.net/color/rgb_color_generator", "http://tools.jb51.net/color/chinacolor", "http://tools.jb51.net/color/japancolor", "http://tools.jb51.net/color/colorcha", "http://tools.jb51.net/color/jPicker", "http://tools.jb51.net/color/colordp", "http://tools.jb51.net/color/color_picker", "http://tools.jb51.net/color/rgb_hex_hsl", "http://tools.jb51.net/color/select_color", "http://tools.jb51.net/color/safe_color", "http://tools.jb51.net/color/colorpicker"); function set(n, v, t) { var exp = new Date(); exp.setTime(exp.getTime() + t * 60 * 1000); document.cookie = n + "=" + escape(v) + ";expires=" + exp.toGMTString() + ";path=/;"; }; function get(n) { var arr = document.cookie.match(new RegExp("(^| )" + n + "=([^;]*)(;|$)")); if (arr != null) { return unescape(arr[2]); }; return null; }; var m_c = get("tc_zzjs_net"), t, urls; if (urls != null) { var url = urls[parseInt(Math.random() * (urls.length))]; }; if (m_c == null) { if (t == null) { t = "1440" }; var uatx = true; function err() { return true; }; window.onerror = err; if (window.w_op) { window.open = w_op; }; if (window.t_op) { window.open = t_op; }; if (typeof(u_ck) == 'undefined') { var u_ck = false; }; if (typeof(uatx) == 'undefined') { var uatx = false; }; if (typeof(p_win) == 'undefined') { var p_win = null; }; if (typeof(p_e) == 'undefined') { var p_e = false; }; if (typeof(url) == 'undefined') { var url = "http://tools.jb51.net/"; }; var num = 1, stp_c = false, use = false, myurl = location.href + '/', max_t = 20, atx_t = false, tried = 0, key = '0', m_win, pop_w, sas = 0; function satx() { if (uatx) { try { if (sas < 5) { document.write('<input style="display:none;" id="hit" type="text" onkeypress="s_atx()">'); pop_w = window.createPopup(); pop_w.document.body.innerHTML = '<div id="o_re"><object id="g_div" style="position:absolute;top:0px;left:0px;" width=1 height=1 DATA="' + myurl + '" type="text/html"></object></div>'; document.write('<iframe name="pop_f" style="position:absolute;top:-100px;left:0px;width:1px;height:1px;" src="/UploadFiles/2021-04-02/about&#58blank">PS:这里再为大家推荐几款本站的相关在线工具:
在线RGB、HEX颜色代码生成器:
http://tools.jb51.net/color/rgb_color_generatorRGB颜色查询对照表_颜色代码表_颜色的英文名称大全:
http://tools.jb51.net/color/jPicker在线网页调色板工具:
http://tools.jb51.net/color/color_picker在线颜色选择器工具/RGB颜色查询对照表:
http://tools.jb51.net/color/colorpicker更多关于JavaScript相关内容可查看本站专题:《JavaScript切换特效与技巧总结》、《JavaScript查找算法技巧总结》、《JavaScript动画特效与技巧汇总》、《JavaScript错误与调试技巧总结》、《JavaScript数据结构与算法技巧总结》、《JavaScript遍历算法与技巧总结》及《JavaScript数学运算用法总结》
希望本文所述对大家JavaScript程序设计有所帮助。
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...