注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

阿龙博客

海阔凭鱼跃 天高任鸟飞

 
 
 

日志

 
 

色彩大全  

2007-02-10 13:44:04|  分类: 代码大全 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=javascript>
<!--
function makeArray(q){for(i=1;i<=q;i++){this[i]=0}}Colors=new makeArray(7);Colors[1]="00";Colors[2]="33";Colors[3]="66";Colors[4]="99";Colors[5]="CC";Colors[6]="FF";
-->
</SCRIPT>

<SCRIPT language=Javascript>
 <!--
 function backcolor(form){
 
         temp = ""
 
         for (var i = 0; i < 16; i++) {
 
                 temp = form.color[i].value
 
                 if (form.color[i].checked){ document.bgColor = temp }
                 }
          }
 
 function randombackground(){
 
         document.bgColor = getColor()
         }
 function getColor(){
         currentdate = new Date()
         backgroundcolor = currentdate.getSeconds()
         if (backgroundcolor > 44)
                 backgroundcolor = backgroundcolor - 45
         else if (backgroundcolor > 29)
                 backgroundcolor = backgroundcolor - 30
         else if (backgroundcolor > 15)
                 backgroundcolor = backgroundcolor - 16
         if (backgroundcolor == 0 )
                 return "olive";
         else if (backgroundcolor == 1 )
                 return "teal";
         else if (backgroundcolor == 2 )
                 return "red";
         else if (backgroundcolor == 3 )
                 return "blue";
         else if (backgroundcolor == 4 )
                 return "maroon";
         else if (backgroundcolor == 5 )
                 return "navy";
         else if (backgroundcolor == 6 )
                 return "lime";
         else if (backgroundcolor == 7 )
                 return "fuschia";
         else if (backgroundcolor == 8 )
                 return "green";
         else if (backgroundcolor == 9 )
                 return "purple";
         else if (backgroundcolor == 10 )
                 return "gray";
         else if (backgroundcolor == 11 )
                 return "yellow";
         else if (backgroundcolor == 12 )
                 return "aqua";
         else if (backgroundcolor == 13 )
                 return "black";
         else if (backgroundcolor == 14 )
                 return "white";
         else if (backgroundcolor == 15 )
                 return "silver";
         }
 
 // -->
 </SCRIPT>

<STYLE>
.spanstyle {
 FONT-WEIGHT: normal; FONT-SIZE: 14pt; VISIBILITY: visible; COLOR: #0066ff; FONT-FAMILY: 隶书; ; TOP: -50px
}
.style2 {color: #FF0000}
</STYLE>
</<BODY bgcolor="#fef4d9">
<META content="MSHTML 6.00.2900.2912" ><FORM>
  <input type=button value=Random>
</FORM>
<SCRIPT language=javascript>
 var message="欢  迎  光  临  javascript 精 彩 世 界  !";
 var x,y;
 var step=12;
 var flag=0;

 message=message.split("");
 var xpos=new Array();
 for (i=0;i<=message.length-1;i++) {
  xpos[i]=-50;
 }

 var ypos=new Array();
 for (i=0;i<=message.length-1;i++) {
  ypos[i]=-50;
 }

 function handlerMM(e) {
  x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX+10;
  y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY;
  flag=1;
 }

 function makesnake() {
  if (flag==1 && document.all) {
       for (i=message.length-1; i>=1; i--) {
       xpos[i]=xpos[i-1]+step;
    ypos[i]=ypos[i-1];
       }
   xpos[0]=x+step;
   ypos[0]=y;

   for (i=0; i<=message.length-1; i++) {
        var thisspan = eval("span"+(i)+".style");
        thisspan.posLeft=xpos[i];
    thisspan.posTop=ypos[i];
    thisspan.color=Math.random() * 255 * 255 * 255 + Math.random() * 255 * 255 + Math.random() * 255;
       }
  }
  else if (flag==1 && document.layers) {
       for (i=message.length-1; i>=1; i--) {
       xpos[i]=xpos[i-1]+step;
    ypos[i]=ypos[i-1];
       }
   xpos[0]=x+step;
   ypos[0]=y;

   for (i=0; i<message.length-1; i++) {
        var thisspan = eval("document.span"+i);
        thisspan.left=xpos[i];
    thisspan.top=ypos[i];
    thisspan.color=Math.random() * 255 * 255 * 255 + Math.random() * 255 * 255 + Math.random() * 255;
   }
  }
 }
</SCRIPT>

 <script language=javascript>
 for (i=0;i<=message.length-1;i++) {
      document.write("<span +i+"' >");
  document.write(message[i]);
      document.write("</span>");
 }

 if (document.layers) {
  document.captureEvents(Event.MOUSEMOVE);
 }
 document.onmousemove = handlerMM;
</script>
 <span ></span>
 <SCRIPT language=javascript>
 function pageonload() {
  makesnake();
  window.setTimeout("pageonload();", 2);
 }
</SCRIPT>

<CENTER>
<TABLE cellSpacing=0 cellPadding=0>
  <SCRIPT language=javascript>
<!--
for(i=1;i<=6;i++){for(j=1;j<=6;j++){for(k=1;k<=6;k++){var thiscolor=Colors[i]+Colors[j]+Colors[k];document.writeln("<tr><td height = 20 bgcolor = \"#" + thiscolor + "\" align = right><a href = ");document.writeln("\'\' document.bgColor=\'"+thiscolor+"\'\">"+thiscolor+"</a></td></tr>");}}}

-->


</SCRIPT>

  <TBODY></TBODY></TABLE></CENTER></BODY></HTML>

  评论这张
 
阅读(210)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017