<script type="text/javascript" language="javascript">
<!--
var ColorHex=new Array('00','33','66','99','CC','FF')
var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF')
var current=null
function initcolor(evt)
{
var colorTable=''
for (i=0;i<2;i++)
{
for (j=0;j<6;j++)
{
colorTable=colorTable+'<tr height=15>'
colorTable=colorTable+'<td width=15 style="background-color:#000000">'
if (i==0){
colorTable=colorTable+'<td width=15 style="cursor:pointer;background-color:#'+ColorHex[j]+ColorHex[j]+ColorHex[j]+'" onclick="doclick(this.style.backgroundColor)">'}
else{
colorTable=colorTable+'<td width=15 style="cursor:pointer;background-color:#'+SpColorHex[j]+'" onclick="doclick(this.style.backgroundColor)">'}
colorTable=colorTable+'<td width=15 style="background-color:#000000">'
for (k=0;k<3;k++)
{
for (l=0;l<6;l++)
{
colorTable=colorTable+'<td width=15 style="cursor:pointer;background-color:#'+ColorHex[k+i*3]+ColorHex[l]+ColorHex[j]+'" onclick="doclick(this.style.backgroundColor)">'
}
}
}
}
colorTable='<table border="0" cellspacing="0" cellpadding="0" style="border:1px #000000 solid;border-bottom:none;border-collapse: collapse;width:337px;" bordercolor="000000">'
+'<tr height=20><td colspan=21 bgcolor=#ffffff style="font:12px tahoma;padding-left:2px;">'
+'<span style="float:left;color:#999999;">12</span>'
+'<span style="float:right;padding-right:3px;cursor:pointer;" onclick="colorclose()">×關閉</span>'
+'</td></table>'
+'<table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="000000" style="cursor:pointer;">'
+colorTable+'</table>';
document.getElementById("colorpane").innerHTML=colorTable;
var current_x = document.getElementById("inputcolor").offsetLeft;
var current_y = document.getElementById("inputcolor").offsetTop;
//alert(current_x + "-" + current_y)
document.getElementById("colorpane").style.left = current_x + "px";
document.getElementById("colorpane").style.top = current_y + "px";
}
function doclick(obj){
//alert(obj);
document.getElementById("inputcolor").value=obj;
document.getElementById("colorpane").style.display = "none";
}
function colorclose(){
document.getElementById("colorpane").style.display = "none";
//alert("ok");
}
function coloropen(){
document.getElementById("colorpane").style.display = "";
}
window.onload = initcolor;
</script>
<input name="color" type="text" onclick="coloropen(event)" id="inputcolor"/>
<div id="colorpane" style="position:absolute;z-index:999;display:none;"></div>
常用鏈接
留言簿(21)
隨筆分類(265)
- android(1)
- c#(.net)(1)
- C++(33)
- DB(5)
- JAVA(38)
- JSP(17)
- linux(7)
- mac(10)
- nginx(3)
- PHP(20)
- python(19)
- UML(1)
- VML(1)
- WebService(2)
- web前端(71)
- XML(4)
- 感悟生活(5)
- 正則表達式(2)
- 計算機綜合(25)
隨筆檔案(242)
- 2012年5月 (1)
- 2012年4月 (2)
- 2011年12月 (9)
- 2011年11月 (20)
- 2011年3月 (8)
- 2010年10月 (15)
- 2010年6月 (2)
- 2010年4月 (1)
- 2010年3月 (7)
- 2010年1月 (4)
- 2009年12月 (1)
- 2009年10月 (1)
- 2009年9月 (1)
- 2009年8月 (8)
- 2009年6月 (11)
- 2009年5月 (3)
- 2009年4月 (7)
- 2008年11月 (5)
- 2008年10月 (6)
- 2008年8月 (1)
- 2008年7月 (6)
- 2008年6月 (5)
- 2008年5月 (1)
- 2008年4月 (18)
- 2008年3月 (1)
- 2008年2月 (1)
- 2007年12月 (9)
- 2007年9月 (5)
- 2007年8月 (6)
- 2007年7月 (4)
- 2007年6月 (6)
- 2007年5月 (8)
- 2007年4月 (9)
- 2007年3月 (6)
- 2007年2月 (44)
相冊
JAVA網站
關注的Blog
搜索
積分與排名
- 積分 - 914173
- 排名 - 40
最新評論

- 1.?re: IP地址獲取當前地理位置接口
- fdf
- --fdfs
- 2.?re: 淺談comet技術
- slowhttp攻擊會直接把server搞垮 因為通常這種應用場景的http的timeout值會比較大
- --harlan
- 3.?re: php動態圖片驗證碼
- 額
- --人
- 4.?re: 關于傳值和傳引用的插曲
- 大家不要看這篇文章 本來很簡單的事情反而被博主繞復雜了,
- --bandit