⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 状态栏字符从右边一个个的“射”出来.htm

📁 状态栏字符从右边一个个的“射”出来
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0044)http://www.hxgzs.com/mckj/texiao/2_00007.htm -->
<HTML><HEAD><TITLE>状态栏字符从右边一个个的“射”出来</TITLE>
<STYLE type=text/css>A:link {
	COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none
}
A:visited {
	COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none
}
A:active {
	COLOR: #ff0000; FONT-FAMILY: 宋体; TEXT-DECORATION: none
}
A:hover {
	COLOR: #ff0000; TEXT-DECORATION: underline
}
BODY {
	FONT-SIZE: 9pt
}
TH {
	FONT-SIZE: 9pt
}
TD {
	FONT-SIZE: 9pt
}
</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>

<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=8 topMargin=8>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
  <TR>
    <TD bgColor=#eeb178 height=30>
      <DIV align=center><FONT color=#993300>【海星工作室】网页特效</FONT></DIV></TD></TR>
  <TR>
    <TD bgColor=#993300>&nbsp;</TD></TR></TBODY></TABLE>
<TABLE borderColor=#eeb178 cellPadding=0 width=760 align=center border=1>
  <TBODY>
  <TR>
    <TD vAlign=top width=180 bgColor=#eeb178>
      <DIV align=right>名称:</DIV></TD>
    <TD bgColor=#eeb178>
      <DIV align=center>状态栏字符从右边一个个的“射”出来</DIV></TD></TR>
  <TR>
    <TD vAlign=top bgColor=#eeb178>
      <DIV align=right>实例:</DIV></TD>
    <TD bgColor=#ffe9ca>&nbsp;</TD></TR>
  <TR>
    <TD vAlign=top bgColor=#eeb178>
      <DIV align=right>代码:</DIV></TD>
    <TD bgColor=#ffe9ca>
      <P>将以下代码加入HTML的&lt;HEAD&gt;&lt;/HEAD&gt;之间</P>
      <P><FONT color=#008800>&lt;script language="JavaScript"&gt;</FONT></P>
      <P><FONT color=#008800>var MESSAGE = " 欢迎来到海星工作室,请多提意见。谢谢! "</FONT></P>
      <P><FONT color=#008800>var POSITION = 150</FONT></P>
      <P><FONT color=#008800>var DELAY = 10</FONT></P>
      <P><FONT color=#008800>var scroll = new statusMessageObject()</FONT></P>
      <P><FONT color=#008800>function statusMessageObject(p,d) {</FONT></P>
      <P><FONT color=#008800>this.msg = MESSAGE</FONT></P>
      <P><FONT color=#008800>this.out = " "</FONT></P>
      <P><FONT color=#008800>this.pos = POSITION</FONT></P>
      <P><FONT color=#008800>this.delay = DELAY</FONT></P>
      <P><FONT color=#008800>this.i = 0</FONT></P>
      <P><FONT color=#008800>this.reset = clearMessage}</FONT></P>
      <P><FONT color=#008800>function clearMessage() {</FONT></P>
      <P><FONT color=#008800>this.pos = POSITION}</FONT></P>
      <P><FONT color=#008800>function scroller() {</FONT></P>
      <P><FONT color=#008800>for (scroll.i = 0; scroll.i &lt; scroll.pos; 
      scroll.i++) {</FONT></P>
      <P><FONT color=#008800>scroll.out += " "}</FONT></P>
      <P><FONT color=#008800>if (scroll.pos &gt;= 0)</FONT></P>
      <P><FONT color=#008800>scroll.out += scroll.msg</FONT></P>
      <P><FONT color=#008800>else scroll.out = 
      scroll.msg.substring(-scroll.pos,scroll.msg.length)</FONT></P>
      <P><FONT color=#008800>window.status = scroll.out</FONT></P>
      <P><FONT color=#008800>scroll.out = " "</FONT></P>
      <P><FONT color=#008800>scroll.pos--</FONT></P>
      <P><FONT color=#008800>if (scroll.pos &lt; -(scroll.msg.length)) 
      {</FONT></P>
      <P><FONT color=#008800>scroll.reset()}</FONT></P>
      <P><FONT color=#008800>setTimeout ('scroller()',scroll.delay)}</FONT></P>
      <P><FONT color=#008800>function snapIn(jumpSpaces,position) {</FONT></P>
      <P><FONT color=#008800>var msg = scroll.msg</FONT></P>
      <P><FONT color=#008800>var out = ""</FONT></P>
      <P><FONT color=#008800>for (var i=0; i&lt;position; i++) </FONT></P>
      <P><FONT color=#008800>{out += msg.charAt(i)}</FONT></P>
      <P><FONT color=#008800>for (i=1;i&lt;jumpSpaces;i++) </FONT></P>
      <P><FONT color=#008800>{out += " "}</FONT></P>
      <P><FONT color=#008800>out += msg.charAt(position)</FONT></P>
      <P><FONT color=#008800>window.status = out</FONT></P>
      <P><FONT color=#008800>if (jumpSpaces &lt;= 1) {</FONT></P>
      <P><FONT color=#008800>position++</FONT></P>
      <P><FONT color=#008800>if (msg.charAt(position) == ' ') </FONT></P>
      <P><FONT color=#008800>{position++ }</FONT></P>
      <P><FONT color=#008800>jumpSpaces = 100-position</FONT></P>
      <P><FONT color=#008800>} else if (jumpSpaces &gt; 3)</FONT></P>
      <P><FONT color=#008800>{jumpSpaces *= .75}</FONT></P>
      <P><FONT color=#008800>else</FONT></P>
      <P><FONT color=#008800>{jumpSpaces--}</FONT></P>
      <P><FONT color=#008800>if (position != msg.length) {</FONT></P>
      <P><FONT color=#008800>var cmd = "snapIn(" + jumpSpaces + "," + position + 
      ")";</FONT></P>
      <P><FONT color=#008800>scrollID = 
      window.setTimeout(cmd,scroll.delay);</FONT></P>
      <P><FONT color=#008800>} else { window.status=""</FONT></P>
      <P><FONT color=#008800>jumpSpaces=0</FONT></P>
      <P><FONT color=#008800>position=0</FONT></P>
      <P><FONT color=#008800>cmd = "snapIn(" + jumpSpaces + "," + position + 
      ")";</FONT></P>
      <P><FONT color=#008800>scrollID = 
      window.setTimeout(cmd,scroll.delay);</FONT></P>
      <P><FONT color=#008800>return false }</FONT></P>
      <P><FONT color=#008800>return true}</FONT></P>
      <P><FONT color=#008800>snapIn(100,0);</FONT></P>
      <P><FONT color=#008800>&lt;/script&gt;</FONT></P></TD></TR>
  <TR>
    <TD vAlign=top bgColor=#eeb178>
      <DIV align=right>说明:</DIV></TD>
    <TD bgColor=#eeb178>无须修改</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
  <TR>
    <TD bgColor=#993300 height=11>&nbsp;</TD></TR>
  <TR>
    <TD bgColor=#993300>
      <DIV align=center><FONT color=#993300>★★★ ★★★ ★★★ ★★★ ★★★ ★★★ ★★★ ★★★ ★★★ 
      ★★★ ★★★ ★★★ ★★★ ★★★ ★★★</FONT></DIV></TD></TR></TBODY></TABLE></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -