网站首页
关于深山
客户案例
业务范围
联系深山
网络投票系统
企业网站建设
旅行社网站建设
小程序
留言板
技术文章
许愿墙(qq爱墙)
技术首页
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
asp.net
DIV+CSS
HTML
SEO搜索引擎忧化
下载类信息
个人空间
代码生成
电商
python
页面特效
表格特效
导航菜单
图形特效
表单特效
时间日期
色彩类别
链接特效
网页特效
系统硬件
网站公告
网页学习
技术类文章
网站类信息
订阅本栏目 RSS
您所在的位置:
深山工作室
>
色彩类别
> 正文
背景调色板:状态栏还能显示颜色值
深山行者个人网站 2009/3/23 21:49:10 深山行者 字体:
大
中
小
浏览 12895
以下为详细代码
背景调色板:状态栏还能显示颜色值 <script language="JavaScript"> <!-- // create 6-element array var hex = new Array(6) // assign non-dithered descriptors hex[0] = "FF" hex[1] = "CC" hex[2] = "99" hex[3] = "66" hex[4] = "33" hex[5] = "00" // accept triplet string and display as background color function display(triplet) { // set color as background color document.bgColor = '#' + triplet // display the color hexadecimal triplet alert('现在的背景色是 #'+triplet) } // draw a single table cell based on all descriptors function drawCell(red, green, blue) { // open cell with specified hexadecimal triplet background color document.write('<TD BGCOLOR="#' + red + green + blue + '">') // open a hypertext link with javascript: scheme to call display function document.write('<A HREF="javascript:display(\'' + (red + green + blue) + '\')">') // print transparent image (use any height and width) document.write('<IMG SRC="place.gif" BORDER=0 HEIGHT=12 WIDTH=12>') // close link tag document.write('</A>') // close table cell document.write('</TD>') } // draw table row based on red and blue descriptors function drawRow(red, blue) { // open table row document.write('<TR>') // loop through all non-dithered color descripters as green hex for (var i = 0; i < 6; ++i) { drawCell(red, hex[i], blue) } // close current table row document.write('</TR>') } // draw table for one of six color cube panels function drawTable(blue) { // open table (one of six cube panels) document.write('<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>') // loop through all non-dithered color descripters as red hex for (var i = 0; i < 6; ++i) { drawRow(hex[i], blue) } // close current table document.write('</TABLE>') } // draw all cube panels inside table cells function drawCube() { // open table document.write('<TABLE CELLPADDING=5 CELLSPACING=0 BORDER=1><TR>') // loop through all non-dithered color descripters as blue hex for (var i = 0; i < 6; ++i) { // open table cell with white background color document.write('<TD BGCOLOR="#FFFFFF">') // call function to create cube panel with hex[i] blue hex drawTable(hex[i]) // close current table cell document.write('</TD>') } // close table row and table document.write('</TR></TABLE>') } // call function to begin execution drawCube() // --> </script>
前一页:
非常不错的支持各种浏览器的简易调色板
后一页:
手动调节背景色:背景色能用按钮进行手动调节
相关阅读
window.location.href和setTimeout结合时间错误
asp统计信息/文章每日、每周、每月、总访问量的方法
网站管理后台
符合标准的正常工作的对联广告(2)
2012-3-22中午的一件电话事件(一个不懂怎么定义的电话)(备份)
8种Python字符串拼接的方法,你知道几种
利用正则替换生成html,经典的,可以用数组进行替换
旅行社手机网站模板4
更多信息>>
栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
DIV+CSS
HTML
python
更多>>
同类信息
非常不错的支持各种浏览器的简易调色板
背景调色板:状态栏还能显示颜色值
手动调节背景色:背景色能用按钮进行手动调节
页面文字变色、变大、还原
windows颜色选择框
超级酷的滚动条颜色代码生成器
更多>>
最新添加文章
dw里面查找替换使用正则删除sqlserver里面的CONSTRAINT
Android移动端自动化测试:使用UIAutomatorViewer与Selenium定位元素
抖音直播音挂载小雪花 懂车帝小程序
javascript获取浏览器指纹可以用来做投票
火狐Mozilla Firefox出现:无法载入您的Firefox配置文件 它可能已经丢失 或是无法访问 问题解决集合处理办法
在Android、iOS、Windows、MacOS中微信小程序的文件存放路径
python通过代码修改pip下载源让下载库飞起
python里面requests.post返回的res.text还有其它的吗
更多>>
随机抽取信息
你们这个系统太专业,很复杂?
苏欧装饰
利用css设置div漂浮在底部或顶部
javascript自动获取Tags关键字
延边金桥国际旅行社有限公司
网站需要SEO,基本的SEO建站要点
更多标签
热门标签
table
265
photoshop
验证
圆角
定律
iis
flush
舒服
div
柱状图
框架
时间
位置
验证码
img
禁止
网页
iframe
filter
背景
在线
台历
名称
强度
ResponseXML
原则
加减
右击
旅游
web2.0
link
替换
间隔
asp.net
slectindext
插件
asasds
相册
例子
txt
选项
窗口
Cookie
虚拟
技巧
数组
过滤
显示器
九宫格
免责声明:本站所有资料信息,有部分为本人原创,部分为从网络收集而来,仅供网友查看阅读所用,所有信息版权归信息所有人或所有公司所有
如果信息内容侵犯到您的版权或权益请与我们联系,经确认后我们会立即移除相关内容或链接
Copyright © 2007-2026
深山工作室
All Rights Reserved
服务QQ:
565449214
手机:
13961347334
ICP备案:
苏ICP备15019627号
苏公网安备 32070502010230号