JavaScript打造的一棵圣诞树


点击(此处)折叠或打开

  1. <html xmlns=\"http://www.w3.org/1999/xhtml\">
  2. <head>
  3.    <title>JavaScript打造的一棵圣诞树 -石家庄瑜伽老师培训  石家庄拓展</title>
  4. </head>
  5. <body>
  6. <STYLE>

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

  8. </STYLE>
  9. <BLOCKQUOTE><FONT COLOR=YELLOW><CENTER>

  10.     *<BR>

  11. * * *<BR>

  12.   * *<BR>

  13. <FONT COLOR=GREEN>

  14. <SCRIPT LANGUAGE=\"JavaScript\">

  15. <!--

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

  17. var Length=Math.round(Number)

  18. var width=1;

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

  20. {

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

  22.     {

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

  24.         {

  25.         var NewNumber=Math.random()*15;

  26.         var Ornament=Math.round(NewNumber);

  27.         if (Ornament<=1)

  28.         {

  29.         document.write(\" ^\");

  30.         }

  31.         if (Ornament>=2){

  32.         document.write(\" ^\");

  33.         }

  34.         }

  35.     document.write(\"
    \");

  36.     var width=width+1;

  37.     }

  38. var width=width-2;

  39. }

  40. //--&gt

  41. </SCRIPT>

  42. </CENTER></FONT></BLOCKQUOTE>

  43. <br />

  44. </body>
  45. </html>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29737856/viewspace-1273912/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29737856/viewspace-1273912/

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值