ITPub博客

首页 > IT职业 > IT图书 > 十二个月特效

十二个月特效

IT图书 作者:chunzhisu 时间:2014-11-05 10:05:42 0 删除 编辑

点击(此处)折叠或打开

  1. <html>
  2. <head>
  3. <meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">
  4. <title>万年历-石家庄渣浆泵-石家庄瑜伽馆</title>
  5. <style>
  6. th{color:#FFF;background-color:#F89807}
  7. td{color:#000;background-color:#FDEDCC}
  8. input,textarea,th,td{font-size:9pt}
  9. </style>
  10. </head>
  11. <body>
  12. <div id=\"hyout\"></div>
  13. <script>
  14. //万年历程菜虫制作 http://happybug.myrice.com
  15. var hy=new Date()
  16. var hyd=new Date()
  17. var cnt=new Array(\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\")
  18. function hyout(hyy,hym){
  19. var outxt=\"\"
  20. outxt+=\"
    \"
  21. outxt+=hym+\"月\"
  22. outxt+=\"\"
  23. for(i=0;i<cnt.length;i++){
  24. outxt+=\"
  25. \"
  26. }
  27. outxt+=\"
  28. \"
  29. var j=0
  30. hyd.setYear(hyy)
  31. hyd.setMonth(--hym)
  32. hyd.setDate(1)
  33. for(var i=1;i<=42;i++){
  34. if((i%7)==1&&i>1)outxt+=\"
  35. \"
  36. if((i<=hyd.getDay())||(hyd.getMonth()!=hym)){
  37. outxt+=\"
  38. \"
  39. }else{
  40. hyd.setDate(++j)
  41. if(hyd.getMonth()==hym){
  42. if(hyd.getDate()==hy.getDate()&&hyd.getMonth()==hy.getMonth()&&hyd.getYear()==hy.getYear()){
  43. outxt+=\"
  44. \"
  45. }else{
  46. outxt+=\"
  47. \"
  48. }
  49. }else{
  50. outxt+=\"
  51. \"
  52. }
  53. }
  54. }
  55. outxt+=\"
  56. \"+cnt[i]+\"
      \"+j+\" \"+j+\"  
  57. \"

  58. return outxt
  59. }
  60. function hyouty(hyy){
  61. hyy=parseFloat(0+hyy)
  62. if(hyy==0) hyy=hy.getYear()
  63. outxt=\"\"
  64. for(var i=1;i<=12;i++){
  65. if(i%4==1&&i>1)outxt+=\"
  66. \"
  67. outxt+=\"
  68. \"
  69. }
  70. outxt+=\"
  71. 公元:+hyy+\"> 年
    \"+hyout(hyy,i)+\"
    \"

  72. document.all[\"hyout\"].innerHTML=outxt
  73. }
  74. hyouty(hy.getYear())
  75. </script>
  76. </body>
  77. </html>

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

请登录后发表评论 登录
全部评论

注册时间:2014-07-04

  • 博文量
    95
  • 访问量
    122209