【状态栏特效】
到百度贴吧首页
新闻   网页   贴吧   知道   MP3   图片   视频   百科
    吧内搜索 | 帮助
1

【状态栏特效】

1.
状态栏文字打字机式效果一段一段出现

<SCRIPT language=JavaScript> 
<!-- 
<!-- 
var speed = 100 
var pause = 1000 
var timerID = null 
var bannerRunning = false 
var ar = new Array() 
ar[0] = "欢迎您光临网页制作大宝库!(http://www.dabaoku.com/)
ar[1] = "本站站长衷心希望大家每天都来光临本站!" 
ar[2] = "如果大家认为本站好的话请向朋友推荐!" 
ar[3] = "如果本站有不足之处,请大家告诉我(EMAIL:web@dabaoku.com)" 
var currentMessage = 0 
var offset = 0 
function stopBanner() { 
if (bannerRunning) 
clearTimeout(timerID) 
bannerRunning = false} 
function startBanner() { 
stopBanner() 
showBanner()} 
function showBanner() { 
var text = ar[currentMessage] 
if (offset < text.length) { 
if (text.charAt(offset) == " ") 
offset++ 
var partialMessage = text.substring(0, offset + 1) 
window.status = partialMessage 
offset++ 
timerID = setTimeout("showBanner()", speed) 
bannerRunning = true} 
else { 
offset = 0 
currentMessage++ 
if (currentMessage == ar.length) 
currentMessage = 0 
timerID = setTimeout("showBanner()", pause) 
bannerRunning = true }} 
startBanner(); 
// --> 
//--> 
</SCRIPT>

2

2.一段文字在状态栏上不停跳动显示,可以作为提示信息

2.
<script language="">
<!--
var yourwords = "欢迎光临『网页制作大宝库』!";
var speed = 700;
var control = 1;
function flash()
{
if (control == 1)
{
window.status=yourwords;
control=0;

else
{
window.status="";
control=1;
}
setTimeout("flash()",speed);
}
// -->
</script>

3

3.在状态栏上显示的字符慢慢向右移动,而且会来回运动

3.
在状态栏上显示的字符慢慢向右移动,而且会来回运动


<SCRIPT LANGUAGE="javascript">
function wh_showStatus(){
if (wh_StatusType == "left") {
wh_StatusText = " " + wh_StatusText;
}
else
if (wh_StatusType == "right") {
wh_StatusText = wh_StatusText.substring(1,wh_StatusText.length);
}
if (wh_StatusText == "" || wh_StatusText.length > 80) {
wh_StatusText = "…………网页大宝库网页素材欢迎您…………";
if (wh_StatusType == "right") {
while (wh_StatusText.length < 80) wh_StatusText = " " + wh_StatusText; 
}
}
status = wh_StatusText;
setTimeout("wh_showStatus()",wh_StatusSpeed);
}
wh_StatusText = "…………网页制作大宝库网页特效欢迎您…………";
wh_StatusSpeed = 100;
wh_StatusType = "left";
if (wh_StatusType == "right") {
while (wh_StatusText.length < 80) wh_StatusText = " " + wh_StatusText; 
}
setTimeout("wh_showStatus()",wh_StatusSpeed);
</SCRIPT>

5

5. 状态栏显示一个走动的时钟

5.
状态栏显示一个走动的时钟

<SCRIPT LANGUAGE=JAVASCRIPT>
<!-- 
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " PM." : " AM."
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock () {
stopclock();
showtime();
}
-->
</SCRIPT>

6

状态栏显示版权信息

<body topmargin="3" leftmargin="3" background="back.gif" onMouseOver="window.status='2001-2002 Designed by 逍遥素材;return true">

7

7. 状态栏的字母象接力棒依次由小写变大写

7.
状态栏的字母象接力棒依次由小写变大写

<script language="JavaScript">
<!--
var text = "ahttp://www.dabaoku.com!-- http://www.dabaoku.com/"
var speed = 50
var x = 0
function bb() {
var a = text.substring(0,x)
var b = text.substring(x,x+1).toUpperCase()
var c = text.substring(x+1,text.length)
window.status = a + b + c
if (x == text.length) {
x = 0
}
else {
x++
}
setTimeout("bb()",speed)
}
bb();
// --></script>

8

8. 状态栏的文字象弹簧一样不停缩放

状态栏的文字象弹簧一样不停缩放

<script LANGUAGE="JavaScript">
<!--
// Scrolling message settings
var MessageText = "欢迎光临◆网页制作大宝库◆--http://www.dabaoku.com"
var DisplayLength = 100
var pos = 1 - DisplayLength;
function ScrollInStatusBar(){
var scroll = "";
pos++;
if (pos == MessageText.length) pos = 1 - DisplayLength;
if (pos<0) {
for (var i=1; i<=Math.abs(pos); i++)
scroll = scroll + "";
scroll = scroll + MessageText.substring(0, DisplayLength - i + 1);
}
else
scroll = scroll + MessageText.substring(pos, pos + DisplayLength);
window.status = scroll;
//Scrolling speed
setTimeout("ScrollInStatusBar()",0);
}
ScrollInStatusBar()
//-->
</script>

9

9. 状态栏的文字从右到左移动

9.
状态栏的文字从右到左移动

<script> 
<!-- Beginning of JavaScript Applet ------------------- 
function scrollit_r2l(seed) 
{ var m1 = "状态栏文字运动 " ; 
var m2 = " " ; 
var msg=m1+m2; 
var out = " "; 
var c = 1; 
var speed = 300 
if (seed > 100) 
{ seed-=2; 
var cmd="scrollit_r2l(" + seed + ")"; 
timerTwo=window.setTimeout(cmd,speed);} 
else if (seed <= 100 && seed > 0) 
{ for (c=0 ; c < seed ; c++) 
{ out+=" ";} 
out+=msg; seed-=2; 
var cmd="scrollit_r2l(" + seed + ")"; 
window.status=out; 
timerTwo=window.setTimeout(cmd,speed); } 
else if (seed <= 0) 
{ if (-seed < msg.length) 

out+=msg.substring(-seed,msg.length); 
seed-=2; 
var cmd="scrollit_r2l(" + seed + ")"; 
window.status=out; 
timerTwo=window.setTimeout(cmd,speed);} 
else { window.status=" "; 
timerTwo=window.setTimeout("scrollit_r2l(100)",speed); 



scrollit_r2l(100); 
// -- End of JavaScript code --> 
</script>

发表回复

标 题:
内 容:
图片/视频链接: (如何贴图/贴视频?)
用户名:
      
©2009 Baidu 贴吧协议  意见反馈