您好!欢迎您光临本站! 体育 I 论坛 I 交友 I

会员注册

I

本站搜索

I

收藏本站

当前位置:首页 >>>网络课堂>>>网页代码教程>>>状态栏特效一
状态栏特效一
发表日期:2007/9/27 18:42:00 出处:未知 作者:馨馨梦幻收集整理 发布人:jxhp 已被访问 912

标题栏状态特效一

 

一、打字效果
 
说明: 文字在状态栏上从左往右一个一个地显示,就象你打出的字一样

 

<script language="JavaScript">
var msg = "欢迎光临烟雨亭,请多提意见。谢谢! " ;
var interval = 120
var spacelen = 120;
var space10=" ";
var seq=0;
function Helpor_net() {
len = msg.length;
window.status = msg.substring(0, seq+1);
seq++;
if ( seq >= len ) {
seq = 0;
window.status = '''''''''''''''';
window.setTimeout("Helpor_net();", interval );
}
else
window.setTimeout("Helpor_net();", interval );
}
Helpor_net();
</script>
 
二、文字从右往左移动
 
说明: 文字在状态栏上从右往左显示,而且是循环的

 

<script>
<!--
function Helpor_net(seed)
{ var m1 = "欢迎光临烟雨亭,请多提意见。谢谢! !" ;
var m2 = "" ;
var msg=m1+m2;
var out = " ";
var c = 1;
var speed = 120;
if (seed > 100)
{ seed-=2;
var cmd="Helpor_net(" + 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="Helpor_net(" + 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="Helpor_net(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,speed);}
else { window.status=" ";
timerTwo=window.setTimeout("Helpor_net(100)",speed);
}
}
}
Helpor_net(100);
-->
</script>
     
 
 
三、文字不停闪烁
 
说明: 一段文字在状态栏上不停跳动显示,可以作为提示信息

 

<script language="">
<!--
var yourwords = "欢迎光临烟雨亭,请多提意见。谢谢! ";
var speed = 700;
var control = 1;
function Helpor_net()
{
if (control == 1)
{
window.status=yourwords;
control=0;
}
else
{
window.status="";
control=1;
}
setTimeout("Helpor_net()",speed);
}
Helpor_net()
// -->
</script>
 
 
四、打字之后移动消失
 
说明: 文字在状态栏上来回频繁地出现,而且速度很快

 

<SCRIPT LANGUAGE="JavaScript">
<!--
var Message="欢迎光临烟雨亭,请多提意见。谢谢!";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("Helpor_net()",300);
} else {
place++;
window.setTimeout("scrollIn()",50);
}
}
function Helpor_net() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("Helpor_net()", 50);
}
}
Helpor_net();
-->
</SCRIPT>
     
 
 
五、鼠标接触链接后状态栏出现特效提示特效
 
说明: 文字在状态栏上来回频繁地出现,而且速度很快

 

<SCRIPT LANGUAGE="JavaScript">
<!--
var Message="欢迎光临烟雨亭,请多提意见。谢谢!! ";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("Helpor_net()",300);
} else {
place++;
window.setTimeout("scrollIn()",50);
}
}
function Helpor_net() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("Helpor_net()", 50);
}
}
Helpor_net();
-->
</SCRIPT>
 
 
六、输入文字,然后在状态栏里显示
 
说明:  在输入框中输入什么,就会在状态栏显示什么,而且是特效显示

 

<form name="shooterform" method="get">
<input type="text" name="shoot_text" size="20" style="border: 1 solid #0099FF"> <input type="button" name="trigger"value="看看" onclick="doShoot(shoot_text.value)" style="color: #FFFFFF; background-color: #0099FF; border: 1 solid #0099FF" border=0>
<input type="reset" value="重写" name="B1" style="color: #FFFFFF; background-color: #0099FF; border: 1 solid #0099FF" border=0> </p>
</form>

<script LANGUAGE="JavaScript">
var text = "欢迎光临烟雨亭,请多提意见。谢谢!";
var total_length = 60; // length of string+spaces

function doShoot(msg) {
var status_message = "";
var assembling = "";
this.status = status_message;
var index = 0;
var location = 0, i;
// now shoot one letter at a time
for(i=0; i < msg.length; i++) { // moves through the message
for(j=total_length-status_message.length; j > -1;j--) {
// see how many spaces have to be added
assembling = "";
for(var k=0; k < j; k++)
assembling += " ";
assembling += msg.charAt(i);
this.status=status_message +assembling;
}
status_message += assembling;
}
}
</script>
 
 
七、文字在状态栏上从左往右一个一个地显示,就象你打出的字一样
 
<script language="JavaScript">
var msg = "欢迎光临烟雨亭,请多提意见。谢谢! " ;
var interval = 120
var spacelen = 120;
var space10=" ";
var seq=0;
function Scroll() {
len = msg.length;
window.status = msg.substring(0, seq+1);
seq++;
if ( seq >= len ) {
seq = 0;
window.status = '''''''''''''''';
window.setTimeout("Scroll();", interval );
}
else
window.setTimeout("Scroll();", interval );
}
Scroll();
</script>
 
 
 

双击自动滚屏 【打印本页】 【关闭窗口
 相关评论:

没有相关评论

 发表评论:

身份选择:会员 游客(游客不需要输入密码)
用 户 名: 密 码:
评论内容:
(最多评论字数:500)

烟雨亭-透明FLASH|QQ空间FLASH|音乐|动漫|图片|教程|娱乐| | 设为首页 | 加入收藏 | 联系我们 | 进入管理 | 关于站长 | 本站搜索

联系电话:QQ:804994046 E-mail:jxhp16789@163.com 联系人:梦幻