javascript 交替变幻的文字

html 专栏收录该内容
12 篇文章 0 订阅

<body οnlοad="dotransition()">

<script>
messages = new Array()
messages[0] = "夫子在线"
messages[1] = "更新更全更方便"
messages[2] = "想交流请到网站"
messages[3] = "http:laofuzi.3322.net"
mescolor = new Array()
mescolor[0] = "000000"
mescolor[1] = "FF0000"
mescolor[2] = "008800"
mescolor[3] = "0000FF"
messize = new Array()
messize[0] = "12pt"
messize[1] = "12pt"
messize[2] = "12pt"
messize[3] = "12pt"
var i_messages = 0
var timer
function dotransition() {
if (document.all) {
content.filters[0].apply()
content.innerHTML = "<span style='color:"+mescolor[i_messages]+";font-size:"+messize[i_messages]+";filter: revealTrans(Transition=12, Duration=3)'>"+messages[i_messages]+"</span>"
content.filters[0].play()
if (i_messages >= messages.length-1) {i_messages = 0}
else {i_messages++}}
if (document.layers) {document.content.document.write("<span style='color:"+mescolor[i_messages]+"'>"+messages[i_messages]+"</span>")
if (i_messages >= messages.length-1) {i_messages = 0}
else {i_messages++}}
timer = setTimeout("dotransition()",5000) }
</script>

<div id="content" style="filter: revealTrans(Transition=12, Duration=2); height: 30; left: 131; position: absolute; text-align: center; top: 155; width: 500"></div>

<div id="source"
style="COLOR: #aaaaaa; LEFT: 170px; POSITION: absolute; TEXT-ALIGN: center; TOP: 243px; WIDTH: 500px"><font color="#000000">


 

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值