• 不断学习才有回报,学无止境!

网页文字变换特效代码

javascript技巧 箭翎 1668次浏览 0个评论 扫描二维码

脚本说明:
第一步:把如下代码加入<body>区域中
<script LANGUAGE=”JavaScript1.1″>
<!– JavaScript ??-

messages = new Array()
messages[0] = “关于大学生设计门户页面特效 。”
messages[1] = “您可以修改本程序并且应用在您的主页上面。”
messages[2] = “但是任何情况下不能用在商业目的!”
messages[3] = “写点什么好呢?。。。。。。”
messages[4] = “有关这个网站的所有问题可以在这里发表”
messages[5] = “是不是非常好记?”
messages[6] = “纷扰的感情纠葛荒废了多少美丽的年华,幸福的时刻几时能够到达?”
messages[7] = “无须等待,与冰点抗衡,调节温度!”
messages[8] = “还写什么好呢? …”
messages[9] = “写一写我吧! 我实在是没的写了~~”
messages[10] = “我叫uefei”
messages[11] = “浓缩时尚风采,拒揽前沿精彩,一切前沿流行资讯尽在这里! ”
messages[12] = “繁杂人世的生活可曾为你增添烦恼?”
messages[13] = “远离一方嘈杂,来到这片清雅天地”
messages[14] = “我是为了学习才做站的~”
messages[15] = “如果你是高手,请多多指教。”
messages[16] = “如果你也是和我一样的菜鸟,我们就共同成长吧!”
messages[17] = “对了,我还有一个站,叫网络”
messages[18] = “地址是http://www.uefei.com。”
messages[19] = “现在开放中,呵呵!”
messages[20] = “非常感谢您访问我的homepage”
messages[21] = “希望您以后能一如既往的支持本站的发展”

mescolor = new Array()
mescolor[0] = “000000”
mescolor[1] = “FF0000”
mescolor[2] = “226622”
mescolor[3] = “0000FF”
mescolor[4] = “FFFF00”

textfont = new Array()
textfont[0] = “Verdana”
textfont[1] = “Times”
textfont[2] = “Arial”

bagcolor = new Array()
bagcolor[0] = “CCCCCC”
bagcolor[1] = “Yellow”
bagcolor[2] = “CCFFFF”
bagcolor[3] = “AAEEFF”
bagcolor[4] = “CCFF88”
bagcolor[5] = “orange”
bagcolor[6] = “99AAFF”

var i_messages = 0
var timer

function randomposition(range) {
return Math.floor(range*Math.random())
}

function dotransition() {
if (document.all) {
content.filters[i_messages].apply()
content.innerHTML = “<table width=320 height=180 border=2><tr><td bgcolor=”+bagcolor[randomposition(6)]+” style=’color:”+mescolor[randomposition(4)]+”;font-family:”+textfont[randomposition(2)]+”;font-size:30px’ align=center valign=middle>”+messages[i_messages]+”</td></tr></table>”
content.filters[i_messages].play()
if (i_messages >= messages.length-1) {
i_messages = 0
}
else {
i_messages++
}
}
timer = setTimeout(“dotransition()”,3000)
}

// – JavaScript ?- –>
</script>
<DIV id=content style=”position: absolute; top:100px; left:10px; width:560px; height:200px; text-align:center; filter: revealTrans(Transition=1, Duration=3) revealTrans(Transition=2, Duration=3) revealTrans(Transition=3, Duration=2) revealTrans(Transition=4, Duration=2) revealTrans(Transition=5, Duration=1) revealTrans(Transition=6, Duration=3) revealTrans(Transition=7, Duration=2) revealTrans(Transition=8, Duration=1) revealTrans(Transition=9, Duration=3) revealTrans(Transition=10, Duration=1) revealTrans(Transition=11, Duration=2) revealTrans(Transition=12, Duration=3) revealTrans(Transition=13, Duration=1) revealTrans(Transition=14, Duration=2) revealTrans(Transition=15, Duration=3) revealTrans(Transition=16 Duration=1) revealTrans(Transition=17, Duration=2) revealTrans(Transition=18, Duration=3) revealTrans(Transition=19, Duration=1) revealTrans(Transition=20, Duration=2) revealTrans(Transition=21, Duration=3) revealTrans(Transition=22, Duration=3)”>
<DIV id=source style=”position: absolute; top:140; left:10; width:560; color: AAAAAA;text-align:center”></DIV>
<DIV id=nn style=”position: absolute; top:20px; left:20px”> </DIV>
第二步:把<body>中的代码改为:
<body onload=”dotransition()”>


箭翎 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明网页文字变换特效代码
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址