HTML.Title閃爍顯示

  1. <!--  
  2.     HTML.Title閃爍顯示;  
  3.     by ScaredParadise   2010-10-17 23:12:46  
  4. -->  
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  6. <html xmlns="http://www.w3.org/1999/xhtml">  
  7. <head>  
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  9. <!--=====================start=======================================-->  
  10. <title>Hello</title>  
  11. <mce:script type="text/javascript"><!--  
  12. var step=0;   
  13. var _title1=document.title;  
  14. var _title2='Kitty';  
  15. for(var i=0;_title2.length<=_title1.length-1;i++) {_title2+='.';}  
  16. function flash_title()  
  17. {  
  18.   step++;  
  19.   if (step==3) {step=1;}  
  20.   if (step==1) {document.title=_title2;}  
  21.   if (step==2) {document.title=_title1;}  
  22.   setTimeout("flash_title()",500);  
  23. }  
  24. flash_title();  
  25. // --></mce:script>  
  26. <!--====================end========================================-->  
  27. </head>  
  28. <body>  
  29. </body>  
  30. </html> 
相關文章
相關標籤/搜索