设为首页 加入收藏
当前位置:首页 > 整站内容 > 特效代码 > 状态栏特效 > 详细内容
可控制滚动方向的状态栏滚动文字
发布时间:2010-3-28  阅读次数:8506  字体大小: 【】 【】【

<html>

<head>
<title>网页特效|Linkweb.cn/Js|---可控制滚动方向的状态栏滚动文字</title>
</head>

<body>
<script Language="JavaScript">
var msg="欢迎学习网页特效                             ";
var start=1;
var control;
function rtol()
{
control=1;
window.status=msg.substring(start,msg.length)+msg.substring(0,start);
start++;
if(start>msg.length) start=0;
if(control==1){ window.setTimeout("rtol()",200); }
}
function ltor()
{
control=2;
window.status=msg.substring(msg.length-start,msg.length)+msg.substring(0,msg.length-start);
start++;
if(start>msg.length) start=0;
if(control==2) { window.setTimeout("ltor()",200); }
}

</script>


<p align="center"><span
style="mso-bidi-font-size: 10.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><font
size="3"><span
style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"> </span></font><font
size="6">状态栏滚动文字</font></span></p>

<p><span
style="mso-bidi-font-size: 10.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">
<font size="4">         <span
style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">状态栏滚动文字类似</span>常设置于页面上部的跑马灯文字,<span
style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">它用</span><span
style="mso-bidi-font-size: 10.0pt; font-family: Times New Roman; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">JavaScript</span><span
style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">编写</span>,实现在状态栏中显示滚动消息,在网页中经常见到。</font></span></p>
  
<div align="center">
   <center>
   <table border="0" width="100%">
       <tr>
           <td width="50%" rowspan="2">
               <p align="center"> </td>
           <td width="50%">   <b><font face="楷体_GB2312" size="3">从</font><font face="楷体_GB2312" size="3"
color="#00FF00"><a href="javascript:ltor()">从左到右</a></font><font face="楷体_GB2312" size="3">的状态栏滚动文字</font></b></td>
       </tr>
       <tr>
           <td width="50%"> <b>
    <font face="楷体_GB2312" size="3"> 从</font><font face="楷体_GB2312" size="3"
color="#00FF00"><a href="javascript:rtol()">从右到左</a></font><font face="楷体_GB2312" size="3">的状态栏滚动文字</font></b></td>
       </tr>
   </table>
   </center>
</div>

<p align="center"><font face="楷体_GB2312" size="3" color="#00FF00"><b>   </b></font></p>

<p><font face="楷体_GB2312" size="3" color="#00FF00"><b>                       </b></font></p>
</body>
</html>

预览效果

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

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

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