var colorhex=new array('00','33','66','99','cc','ff')
var spcolorhex=new array('ff0000','00ff00','0000ff','ffff00','00ffff','ff00ff')
var current=null
function intocolor()
{
var colortable=''
for (i=0;i<2;i++)
{
for (j=0;j<6;j++)
{
colortable=colortable+'
colortable=colortable+'
if (i==0){
colortable=colortable+'
else{
colortable=colortable+'
colortable=colortable+'
for (k=0;k<3;k++)
{
for (l=0;l<6;l++)
{
colortable=colortable+'
}
}
}
}
colortable='
' +' |
'
+'
';
colorpanel.innerhtml=colortable
}
function doover() {
if ((event.srcelement.tagname=="td") && (current!=event.srcelement)) {
if (current!=null){current.style.backgroundcolor = current._background}
event.srcelement._background = event.srcelement.style.backgroundcolor
discolor.style.backgroundcolor = event.srcelement.style.backgroundcolor
hexcolor.value = event.srcelement.style.backgroundcolor
event.srcelement.style.backgroundcolor = "white"
current = event.srcelement
}
}
function doout() {
if (current!=null) current.style.backgroundcolor = current._background
}
function doclick(){
if (event.srcelement.tagname=="td"){
alert("选取颜色: "+event.srcelement._background)
return event.srcelement._background
}
}
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
《JS 网页安全色调色板 DW风格.doc》
下载本文的Word格式文档,以方便收藏与打印。
-
JS Element.scrollIntoView()怎么使用
这篇文章主要讲解了“JS Element.scrollIntoView()怎么使用”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“JS Element.scrollIntoView()怎么使用”吧! Element ...
2024-03-14编程代码Element.scrollIntoView(),js