定时更换超级连接的代码
来源:互联网 发布:dnf全屏捡物源码 编辑:程序博客网 时间:2024/06/05 16:41
<!--用<body onload="if (document.all||document.layers) {regenerate2();update()}">替换原来的<Body>-->
<!--将以下代码加入HTML的<Body></Body>之间-->
<style>
<!--
#tickertape{
position:relative;
layer-background-color:black;
width:400;
height:12;
; font-family: "宋体"; font-size: 9pt}
#subtickertape{
background-color:black;
position:absolute;
border: 1px solid black;
width:400;
height:12;
; font-family: "宋体"; font-size: 9pt
}
.subtickertapefont{
font:bold 9pt "宋体";
text-decoration:none;
color:white;
}
.subtickertapefont a{
color:white;
text-decoration:none;
; font-family: "宋体"; font-size: 9pt}
-->
</style>
<div id="tickertape">
<div id="subtickertape" class="subtickertapefont">初始化...</div>
</div>
<script language="JavaScript1.2">
var speed=4500
var news=new Array()
news[0]="<a href='http://remotion.myetang.com'>网页特效梦工厂</a>"
news[1]="<a href='http://www.skycn.com'>天空下载</a>"
news[2]="<a href='http://www.delphibbs.com'>大富翁论坛</a>"
i=0
if (document.all)
tickerobject=document.all.subtickertape.style
else
tickerobject=document.tickertape.document
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",450)
}
function update(){
BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10);
if (document.layers){
document.tickertape.document.subtickertape.document.write('<span class="subtickertapefont">'+news[i]+'</span>')
document.tickertape.document.subtickertape.document.close()
}
else
document.all.subtickertape.innerHTML=news[i]
if (i<news.length-1)
i++
else
i=0
setTimeout("update()",speed)
}
function BgFade(red1, grn1, blu1, red2,
grn2, blu2, steps) {
sred = red1; sgrn = grn1; sblu = blu1;
ered = red2; egrn = grn2; eblu = blu2;
inc = steps;
step = 0;
RunFader();
}
function RunFader() {
var epct = step/inc;
var spct = 1 - epct;
if (document.layers)
tickerobject.bgColor =
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
else
tickerobject.backgroundColor=
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
if ( step < inc ) {
setTimeout('RunFader()',50);
}
step++;
}
</script>
</tr></table>
<!--将以下代码加入HTML的<Body></Body>之间-->
<style>
<!--
#tickertape{
position:relative;
layer-background-color:black;
width:400;
height:12;
; font-family: "宋体"; font-size: 9pt}
#subtickertape{
background-color:black;
position:absolute;
border: 1px solid black;
width:400;
height:12;
; font-family: "宋体"; font-size: 9pt
}
.subtickertapefont{
font:bold 9pt "宋体";
text-decoration:none;
color:white;
}
.subtickertapefont a{
color:white;
text-decoration:none;
; font-family: "宋体"; font-size: 9pt}
-->
</style>
<div id="tickertape">
<div id="subtickertape" class="subtickertapefont">初始化...</div>
</div>
<script language="JavaScript1.2">
var speed=4500
var news=new Array()
news[0]="<a href='http://remotion.myetang.com'>网页特效梦工厂</a>"
news[1]="<a href='http://www.skycn.com'>天空下载</a>"
news[2]="<a href='http://www.delphibbs.com'>大富翁论坛</a>"
i=0
if (document.all)
tickerobject=document.all.subtickertape.style
else
tickerobject=document.tickertape.document
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",450)
}
function update(){
BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10);
if (document.layers){
document.tickertape.document.subtickertape.document.write('<span class="subtickertapefont">'+news[i]+'</span>')
document.tickertape.document.subtickertape.document.close()
}
else
document.all.subtickertape.innerHTML=news[i]
if (i<news.length-1)
i++
else
i=0
setTimeout("update()",speed)
}
function BgFade(red1, grn1, blu1, red2,
grn2, blu2, steps) {
sred = red1; sgrn = grn1; sblu = blu1;
ered = red2; egrn = grn2; eblu = blu2;
inc = steps;
step = 0;
RunFader();
}
function RunFader() {
var epct = step/inc;
var spct = 1 - epct;
if (document.layers)
tickerobject.bgColor =
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
else
tickerobject.backgroundColor=
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
if ( step < inc ) {
setTimeout('RunFader()',50);
}
step++;
}
</script>
</tr></table>
- 定时更换超级连接的代码
- 带参数的超级连接
- 制作带有超级连接的统计图
- 超级连接很酷的变色
- 更换XP序列号的代码!
- jquery更换网页背景的代码
- 用超级连接实现界面的切换
- css 超级连接的四种状态
- 超级连接-传送门-实用的工具网址
- js定时更换图片
- 自定义制作 自动定时更换图片的桌面背景 html页面
- 貌似flash的图片更换代码
- 实现壁纸更换的示范代码
- javascript定时更换表格背景
- 使用AlarmManager定时更换壁纸
- Android-定时更换控件背景图片
- 超级连接在值的传递过程中发生丢失
- 通过CSS类型的顺序改变网页超级连接翻滚效果
- [DOC]给C++初学者的50个忠告
- 点广告才可以下载的代码
- 站长站弹出广告代码
- Velocity学习笔记6——VTL中的引用
- 总在最下的广告代码
- 定时更换超级连接的代码
- 星空背景JavaScript代码
- 时间特效。js读取时间
- JavaScript鼠标经过图片加亮显示
- JavaScript鼠标经过图片晃动效果
- 世界上最好博客的47个博客技巧
- 设为首页+加入收藏夹+打印网页
- 超级连接很酷的变色
- JavaScript图片幻灯片显示效果