多条问候语句交替显示

时间:2010-04-14 12:15:28  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读:var scrollheight=75var message=new Array()var openingtag='<font face="Arial" size=3 color=FF9900>'message[0]='<b>多条问候语句交替显示</b>'message[1]='<b>欢迎来到MeMoon网翼</b>'message[2]='<b>打造绿色、无广告的网页技术站</b>'var closingtag='</font>'var ho...
  正文:<script language="<a class="channel_keylink" href="java.chinaitlab.com/">http://java.chinaitlab.com/" target="_blank">Java</a>Script1.2">
var delay=2000
var scrollwidth=250
var scrollheight=75
var message=new Array()
var openingtag='<font face="Arial" size=3 color=FF9900>'
message[0]='<b>多条问候语句交替显示</b>'
message[1]='<b>欢迎来到MeMoon网翼</b>'
message[2]='<b>打造绿色、无广告的网页技术站</b>'
var closingtag='</font>'
var hoffset=-10
</script>
<ilayer width=&{scrollwidth}; height=&{scrollheight}; name="sslide">
<layer name="sslide2" width=&{scrollwidth}; height=&{scrollheight};></layer>
</ilayer>
<script language="<a class="channel_keylink" href="java.chinaitlab.com/">http://java.chinaitlab.com/" target="_blank">Java</a>Script1.2">
var inc=1
var ns4=document.layers
var ie5ns6=document.getElementById||document.all
if (ie5ns6)
document.write(openingtag+'<div id="flyin" style="position:relative;width:'+scrollwidth+';height:'+scrollheight+';">'+message[0]+'</div>'+closingtag)
function updatemsg(){
crossobj.style.left=-2000
crossobj.style.fontStyle="italic"
crossobj.innerHTML=message[inc]
crossobj.style.left=crossobj.offsetWidth*(-1)+hoffset
start=setInterval("animatein()",50)
inc=(inc<message.length-1)? inc+1 : 0
}
function animatein(){
if (parseInt(crossobj.style.left)<0)
crossobj.style.left=parseInt(crossobj.style.left)+20
else{
crossobj.style.left=0
crossobj.style.fontStyle="normal"
clearInterval(start)
}
}
function updatemsgns4(){
document.sslide.document.sslide2.document.write(openingtag+message[inc]+closingtag)
document.sslide.document.sslide2.document.close()
inc=(inc<message.length-1)? inc+1 : 0
}
function initialize(){
if (ie5ns6){
crossobj=document.getElementById? document.getElementById("flyin") : document.all.flyin
setInterval("updatemsg()",delay+1000)
}
else if (ns4){
document.sslide.document.sslide2.document.write(openingtag+message[0]+closingtag)
document.sslide.document.sslide2.document.close()
setInterval("updatemsgns4()",delay)
}
}
window.onload=initialize
</script>

多条问候语句交替显示》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Programming/JavaScript/13630.html


关键字:

关于《多条问候语句交替显示》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td