65、圣诞树

65、圣诞树

脚本说明:

把如下代码加入<body>区域中

<STYLE>

 

BLOCKQUOTE {font-weight:900; line-height:0.75em}

 

</STYLE>

<BLOCKQUOTE><FONT COLOR=YELLOW><CENTER>

 

    *<BR>

 

*  *  *<BR>

 

  *  *<BR>

 

<FONT COLOR=GREEN>

 

<SCRIPT LANGUAGE="JavaScript">

 

<!--

 

var Number=Math.random()*10+3;

 

var Length=Math.round(Number)

 

var width=1;

 

for (i=0; i<=Length; i++)

 

{

 

       for (x=0; x<=4; x++)

 

       {

 

              for (y=1; y<=width; y++)

 

              {

 

              var NewNumber=Math.random()*15;

 

              var Ornament=Math.round(NewNumber);

 

              if (Ornament<=1)

 

              {

 

              document.write("</FONT><FONT COLOR=RED> ^</FONT><FONT COLOR=GREEN>");

 

              }

 

              if (Ornament>=2){

 

              document.write(" ^");

 

              }

 

              }

 

       document.write("<BR>");

 

       var width=width+1;

 

       }

 

var width=width-2;

 

}

 

//-->

 

</SCRIPT>

 

</CENTER></FONT></BLOCKQUOTE>

 

Write a comment

Comments: 0