首  页  |  酷站  |  精品网站  |  原创作品秀  |  网络学院   |  信息中心  |  艺术设计  |  求职招聘  |  建站资源  |  服装网站  |  论坛  |  设计部落  |  网站综合
个人网页  商业网站  业界动态  设计赛事  网站资源  下载专区  设计欣赏  CG-插画  JS特效  娱乐  国际品牌  知名品牌  服装院校  专题欣赏  SEO  BANNER
域名注册 虚拟主机 广州网站建设 广州网页设计 IDC赞助 设计资源下载 虚拟主机 域名注册 品牌网站建设 服装品牌网站建设 广告服务 网站推广 娱乐
当前位置:首 页 >> JS特效 >> 鼠标事件类 >> 打字效果的新闻标题

打字效果的新闻标题

来源:51windows 被读295次

中资源
转载请注明出处-中国设计秀-cnwebshow.com

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>打字效果的新闻标题- 51windows.Net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body{font-size:14px;font-weight:bold;}
</style>
</head>
<body>
最新内容:<a id="HotNews" href="" target="_blank"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
var NewsTime = 2000; //每条新闻的停留时间
var TextTime = 50;  //新闻标题文字出现等待时间,越小越快

var newsi = 0;
var txti = 0;
var txttimer;
var newstimer;

var newstitle = new Array(); //新闻标题
var newshref = new Array();  //新闻链接

newstitle[0] = "世界银行公布世界最富和最穷国家前10名";
newshref[0] = "http://www.51windows.net/data/files/file_695.asp";

newstitle[1] = "安全经过广州火车站攻略";
newshref[1] = "http://www.51windows.net/data/files/file_682.asp";

newstitle[2] = "没有卖不出去的豆子";
newshref[2] = "http://www.51windows.net/data/files/file_686.asp";

newstitle[3] = "人类为何活不到自然寿命";
newshref[3] = "http://www.51windows.net/data/files/file_680.asp";

newstitle[4] = "没人会踢一只死狗";
newshref[4] = "http://www.51windows.net/data/files/file_685.asp";

function shownew()
{
 //code by haiwa @2005-10-21 www.51windows.net
 var endstr = "_"
 hwnewstr = newstitle[newsi];
 newslink = newshref[newsi];
 if(txti==(hwnewstr.length-1)){endstr="";}
 if(txti>=hwnewstr.length){
  clearInterval(txttimer);
  clearInterval(newstimer);
  newsi++;
  if(newsi>=newstitle.length){
   newsi = 0
  }
  newstimer = setInterval("shownew()",NewsTime);
  txti = 0;
  return;
 }
 clearInterval(txttimer);
 document.getElementById("HotNews").href=newslink;
 document.getElementById("HotNews").innerHTML = hwnewstr.substring(0,txti+1)+endstr;
 txti++;
 txttimer = setInterval("shownew()",TextTime);
}
shownew();
//-->
</SCRIPT>
</body>
</html>

转载请注明出处-中国设计秀-cnwebshow.com



投稿 】【对本文进行评论】 【字体: 】【发布于2006-05-05 21:54】

相关专题:暂无相关专题

上一篇:鼠标移上去,图片渐显的方法   下一篇:一个按钮同时打开多个搜索引擎
 认证LOGO下载
     
Copyright © 2005-2007 中国设计秀_网页设计教程_优秀网页设计欣赏_平面设计欣赏 All Right Reserved.
做最专业的设计服务网站,秀出自我,秀出精彩!中国设计秀,秀---无处不在!!
QQ:54292427  8208442 MSN:kingvisual#hotmail.com 交流群:9107036 3848215 8850631
粤ICP备05067046号 RSS