editcolor.htm
来自「静态新闻系统 88red静态新闻系统1.0经过精心打造正式推出」· HTM 代码 · 共 85 行
HTM
85 行
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>颜色调节器</title>
<link href="../../css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="eeeeee">
<div align="center">
<table width=255 border=0 cellspacing=2 cellpadding=0 style='font-size:25px;' id=tds>
<Tr>
<td bgcolor=white onmouseup='mov(a)'> <table width=20 height=100% style='position:relative;' id=a>
<Tr>
<Td bgcolor=black> </td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor=white onmouseup='mov(b)'> <table width=20 height=100% style='position:relative;' id=b>
<Tr>
<Td bgcolor=black> </td>
</tr>
</table></td>
</tr>
<Tr>
<Td bgcolor=white onmouseup='mov(c)'> <table width=20 height=100% style='position:relative;' id=c>
<Tr>
<Td bgcolor=black> </td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width=255 border=0 height=50>
<tr>
<Td id=d bgcolor=black> </tD>
</tr>
</table>
</div>
<div align="center" id=e><font color=red>红:0 </font><font color=green>绿:0 </font><font color=blue>蓝:0
</font></div>
<p align="center">
<input id=txt1 value=#000000 style='width:198' readonly>
应用
<input type=radio name=radio1 checked>
<br>
<input id=txt2 value=rgb(0,0,0) style='width:198' readonly>
应用
<input type=radio name=radio1>
<br>
<input id=txt3 value=rgb(0%,0%,0%) style='width:198' readonly>
应用
<input type=radio name=radio1>
<br>
<input type=button onclick="ok()" value="确认输入">
<script>
function mov(who){
who.style.posLeft=event.offsetX
d.bgColor='rgb('+a.style.posLeft+','+b.style.posLeft+','+c.style.posLeft+')'
e.innerHTML="<font color=red>红:"+a.style.posLeft+" </font><font color=green>绿:"+b.style.posLeft+" </font><font color=blue>蓝:"+c.style.posLeft
txt1.value=d.bgColor
txt2.value='rgb('+a.style.posLeft+','+b.style.posLeft+','+c.style.posLeft+')'
txt3.value='rgb('+Math.round(a.style.posLeft/2.55)+'%,'+Math.round(b.style.posLeft/2.55)+'%,'+Math.round(c.style.posLeft/2.55)+'%)'
}
function ok(){
if(document.all("radio1")[0].checked==true){txtstr=txt1.value}
if(document.all("radio1")[1].checked==true){txtstr=txt2.value}
if(document.all("radio1")[2].checked==true){txtstr=txt3.value}
returnValue=txtstr+"*"+a.style.posLeft+"*"+b.style.posLeft+"*"+c.style.posLeft
window.close()
}
function onloads(){
a.style.posLeft=dialogArguments.color1
b.style.posLeft=dialogArguments.color2
c.style.posLeft=dialogArguments.color3
d.bgColor='rgb('+a.style.posLeft+','+b.style.posLeft+','+c.style.posLeft+')'
e.innerHTML="<font color=red>红:"+a.style.posLeft+" </font><font color=green>绿:"+b.style.posLeft+" </font><font color=blue>蓝:"+c.style.posLeft
txt1.value=d.bgColor
txt2.value='rgb('+a.style.posLeft+','+b.style.posLeft+','+c.style.posLeft+')'
txt3.value='rgb('+Math.round(a.style.posLeft/2.55)+'%,'+Math.round(b.style.posLeft/2.55)+'%,'+Math.round(c.style.posLeft/2.55)+'%)'
}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?