1. <b><font color="blue">奥运会开幕还有:</font>
  2. <font color="red"><span id="timeDate">载入天数...</span><span id="times">载入倒计时秒...</span>
  3. <script>
  4. var now = new Date();
  5. function createtime(){
  6.  
  7. var grt= new Date("8/08/2008 20:00:00");
  8.  
  9. now.setTime(now.getTime()+250);
  10. days = (grt - now) / 1000 / 60 / 60 / 24;
  11. dnum = Math.floor(days);
  12. hours = (grt - now) / 1000 / 60 / 60 - (24 * dnum);
  13. hnum = Math.floor(hours);
  14. if(String(hnum).length ==1 ){hnum = "0" + hnum;}
  15. minutes = (grt - now) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
  16. mnum = Math.floor(minutes);
  17. if(String(mnum).length ==1 ){mnum = "0" + mnum;}
  18. seconds = (grt - now) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
  19. snum = Math.round(seconds);
  20. if(String(snum).length ==1 ){snum = "0" + snum;}
  21.  
  22. document.getElementById("timeDate").innerHTML = dnum+"天";
  23. document.getElementById("times").innerHTML = hnum + ":" + mnum + ":" + snum;
  24. }
  25.  
  26. setInterval("createtime()",250);               
  27. </script>
  28. </font></b>
, , ,
  1. <font color="red"><b>
  2. <script language="JavaScript">
  3. <!--
  4. tmpDate = new Date();
  5. date = tmpDate.getDate();
  6. month= tmpDate.getMonth() + 1 ;
  7. myyear= tmpDate.getYear();
  8. year=(myyear > 200) ? myyear : 1900 + myyear;
  9.  
  10. document.write(year);
  11. document.write("年");
  12. document.write(month);
  13. document.write("月");
  14. document.write(date);
  15. document.write("日 ");
  16.  
  17. myArray=new Array(6);
  18. myArray[0]="星期日"
  19. myArray[1]="星期一"
  20. myArray[2]="星期二"
  21. myArray[3]="星期三"
  22. myArray[4]="星期四"
  23. myArray[5]="星期五"
  24. myArray[6]="星期六"
  25. weekday=tmpDate.getDay();
  26. if (weekday==0 | weekday==6)
  27. {
  28. document.write(myArray[weekday])
  29. }
  30. else
  31. {document.write(myArray[weekday])
  32. };
  33.  
  34. hours = tmpDate.getHours();
  35. minutes = tmpDate.getMinutes();
  36. seconds = tmpDate.getSeconds();
  37. times = "<font color=orange>" + ((hours >24) ? hours -12 :hours); times += ((minutes < 10) ? "<blink>:</blink>0" : "<blink>:</blink>") + minutes+"</font>";
  38. times += (hours >= 12) ? "<b>PM</b>" : "<b>AM</b>";
  39. document.write(times);
  40. // -->
  41. </script>
  42. </b></font>
, , ,

演示地址:MarcoDesign

风格下载

, ,

演示地址:江阴印刷网

风格下载

, ,
  1. <?php if ( is_home() ) { ?>//判断是否首页<?php } ?>
  1. <?php if ( is_single() ) { ?>//判断是否文章页<?php } ?>
  1. <?php if ( is_single('17') ) { ?>//判断是否ID为17的文章页<?php } ?>
  1. <?php if ( is_single('Beef Stew') ) { ?>//判断标题是否为 Beef Stew 的文章页<?php } ?>
  1. <?php if ( comments_open() ) { ?>//当前页是否允许回复<?php } ?>
  1. <?php if ( pings_open() ) { ?>//是否开启 ping<?php } ?>
  1. <?php if ( is_page() ) { ?>//是否是一个页面<?php } ?>
  1. <?php if ( is_category() ) { ?>//判断是否为分类页面<?php } ?>
  1. <?php if ( is_tag() ) { ?>//是否TAG页面;可以用 is_tag('tagname') 判断具体的TAG<?php } ?>
  1. <?php if ( is_author() ) { ?>//是否某个用户的文章;可以加入用户ID,或用户名作为参数<?php } ?>
  1. <?php if ( is_archive() ) { ?>//判断是否存档<?php } ?>
  1. <?php if ( is_search() ) { ?>//判断是否搜索<?php } ?>
  1. <?php if ( is_404() ) { ?>//判断是否404页面<?php } ?>
  1. <?php if ( is_paged() ) { ?>//判断是否翻页<?php } ?>

例如,一个只需要在首页显示的可以用一下语句解决:

  1. <?php if(is_home() && !is_paged()){?>
  2. ...
  3. <?php }?>

一个不在首页显示的,例如“最近发表文章”的插件可以加一个

  1. <?php if(!is_home()){?>
  2.  ...
  3. <?php }?>//避免首页内容和插件内容重复。

收藏自零号相册

, ,