设为首页 加入收藏
当前位置:首页 > 整站内容 > 特效代码 > 状态栏特效 > 详细内容
状态栏文字从右弹出
发布时间:2010-3-28  阅读次数:8285  字体大小: 【】 【】【

<html>

<head>

<title>网页特效|Linkweb.cn/Js|---状态栏文字从右弹出</title>

<style type="text/css">

<!--

body {   font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}

A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }

  A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }

a:active         { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

-->
</style>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script language="JavaScript">

     var MESSAGE   =     "     欢迎来到网页特效观止网站,请多提意见。谢谢!     "

     var POSITION = 150

     var DELAY       = 10

     var scroll = new statusMessageObject()

  function statusMessageObject(p,d) {

   this.msg = MESSAGE

   this.out = " "

   this.pos = POSITION

   this.delay = DELAY

   this.i         = 0

   this.reset = clearMessage}

function clearMessage() {

   this.pos = POSITION}

function scroller() {

   for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) {

       scroll.out += " "}

   if (scroll.pos >= 0)

     scroll.out += scroll.msg

   else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length)

   window.status = scroll.out

   scroll.out = " "

   scroll.pos--

   if (scroll.pos < -(scroll.msg.length)) {

     scroll.reset()}

   setTimeout ('scroller()',scroll.delay)}

function snapIn(jumpSpaces,position) {

   var msg = scroll.msg

   var out = ""

   for (var i=0; i<position; i++)

       {out += msg.charAt(i)}

   for (i=1;i<jumpSpaces;i++)

       {out += " "}

   out += msg.charAt(position)

   window.status = out

   if (jumpSpaces <= 1) {

       position++

       if (msg.charAt(position) == ' ')

           {position++ }

       jumpSpaces = 100-position

   } else if (jumpSpaces >   3)

             {jumpSpaces *= .75}

   else

       {jumpSpaces--}

   if (position != msg.length) {

       var cmd = "snapIn(" + jumpSpaces + "," + position + ")";

       scrollID = window.setTimeout(cmd,scroll.delay);

   } else {       window.status=""

       jumpSpaces=0

       position=0

       cmd = "snapIn(" + jumpSpaces + "," + position + ")";

       scrollID = window.setTimeout(cmd,scroll.delay);

       return false }

   return true}

snapIn(100,0);

</script>

</head>

<body>
<br>
<br>
<center><font color=red face="隶书" size=6>文字从右弹出</font></center>

<br>
<center>
<table border=5 bordercolor=blue borderlight=green>
<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>状态栏为效果显示区!</strong></font></td></tr>

</table></center>
<br>
<br>
<center>
<SCRIPT LANGUAGE="JavaScript">

<!-- hide
function goHist(a)
{
     history.go(a);

}

//-->

</script></center>

<br>

<br>

</body>

</html>

预览效果

天猫商城    聚划算    天猫电器城    淘宝旅行    天猫超市    淘宝游戏    天猫品牌特卖    天猫母婴

我要评论
  • 匿名发表
  • [添加到收藏夹]
  • 发表评论:(匿名发表无需登录,已登录用户可直接发表。) 登录状态:未登录
最新评论
所有评论[0]
    暂无已审核评论!

全站链接: 
收录查询
分享按钮