当前位置: 主页 > 网页制作 > 其他 > 冒泡字符的状态栏特效

冒泡字符的状态栏特效

时间:2009-12-18来源:互联网 点击:

有什么问题请到评论中发表<br>

<!-- http://www.mb5u.com/ -->

<!-- http://wWw.mb5u.com/ -->

<!--要完成此效果需要两个步骤

 

第一步:把如下代码加入到<head>区域中-->

 

<script language="JavaScript">

 

  <!-- Funny text script by Bart Jellema

    var hellotext="欢迎光临模板无忧"

    var thetext=""

    var started=false

    var step=0

    var times=1

 

    function welcometext()

    {

      times--

      if (times==0)

      {

        if (started==false)

        {

          started = true;

          window.status = hellotext;

          setTimeout("anim()",1);

        }

        thetext = hellotext;

      }

    }

 

    function showstatustext(txt)

    {

      thetext = txt;

      setTimeout("welcometext()",4000)

      times++

    }

 

    function anim()

    {

      step++

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

      if (step==1) {window.status=‘>===‘+thetext+‘===<‘}

      if (step==2) {window.status=‘=>==‘+thetext+‘==<=‘}

      if (step==3) {window.status=‘>=>=‘+thetext+‘=<=<‘}

      if (step==4) {window.status=‘=>=>‘+thetext+‘<=<=‘}

      if (step==5) {window.status=‘==>=‘+thetext+‘=<==‘}

      if (step==6) {window.status=‘===>‘+thetext+‘<===‘}

      setTimeout("anim()",200);

    }

 

 

</script>

 

 

<!--第二步:把“onLoad="welcometext()"”加在<body>标记里-->

<body onLoad="welcometext()">

 

站长资讯网
. TAG: 冒泡字符 状态栏
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言