25、一个闪动的标题栏特效

25、一个闪动的标题栏特效

要完成此效果把如下代码加入到<head>区域中

 

<title></title>

<script language=javascript >

 

title_tmp1=document.title

if (title_tmp1.indexOf(">>")!=-1){

    title_tmp2=title_tmp1.split(">>");

    title_last=" —> "+title_tmp2[1];

    title_last=title_last + " —> " + title_tmp2[2];

}else{

 

    if (title_tmp1.indexOf("——")!=-1){

    title_tmp2=title_tmp1.split("——");

    title_last=" —> "+title_tmp2[1];

        if (title_last==" —> "){title_last=" —> "};

        if (title_last==" —> "){title_last=" —> "};

    }

    else {    title_last="==>http://www.7stk.com"}

    }

 

 

title_new="JavaScript Fairyland"+title_last+""

step=0

 

function flash_title()

    {

      step++

      if (step==7) {step=1}

      if (step==1) {document.title='◆◇◇◇'+title_new+'◇◇◇◆'}

      if (step==2) {document.title='◇◆◇◇'+title_new+'◇◇◆◇'}

      if (step==3) {document.title='◇◇◆◇'+title_new+'◇◆◇◇'}

      if (step==4) {document.title='◇◇◇◆'+title_new+'◆◇◇◇'}

      if (step==5) {document.title='◇◇◆◇'+title_new+'◇◆◇◇'}

      if (step==6) {document.title='◇◆◇◇'+title_new+'◇◇◆◇'}

      setTimeout("flash_title()",180);

    }

flash_title()

 

</script>

 

 

 

    状态栏和标题栏代码

Write a comment

Comments: 1
  • #1

    伟光 (Wednesday, 02 December 2009 15:51)

    你好;看了看你的特效代码,你看能否加上实际效果