?? 狀態欄字符從右邊一個個的“射”出來.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> </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> </TD></TR>
<TR>
<TD vAlign=top bgColor=#eeb178>
<DIV align=right>代碼:</DIV></TD>
<TD bgColor=#ffe9ca>
<P>將以下代碼加入HTML的<HEAD></HEAD>之間</P>
<P><FONT color=#008800><script language="JavaScript"></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 < scroll.pos;
scroll.i++) {</FONT></P>
<P><FONT color=#008800>scroll.out += " "}</FONT></P>
<P><FONT color=#008800>if (scroll.pos >= 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 < -(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<position; i++) </FONT></P>
<P><FONT color=#008800>{out += msg.charAt(i)}</FONT></P>
<P><FONT color=#008800>for (i=1;i<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 <= 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 > 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></script></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> </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 + -