單行卷軸
<script language=JavaScript1.2>
var message= new Array()
// message[indexnumber]="標(biāo)題|說(shuō)明|網(wǎng)址"
message[0]="你的標(biāo)題|內(nèi)容1Jojoo"
message[1]="你的標(biāo)題|內(nèi)容2www.jojoo.net"
message[2]="你的標(biāo)題|內(nèi)容3yeah#"
// 卷軸的高
var scrollerheight=20
// 標(biāo)題寬
var titlezonewidth=60
// 說(shuō)明寬
var copyzonewidth=340
// 距離窗口頂
var scrollertop=20
// 距離窗口左
var scrollerleft=20
var scrollerborder=2
// 標(biāo)題背景色
var titlezonebg="330066"
// 文字的背景色
var copyzonebg="CC0000"
// 卷軸的背景色
var scrollbg="AAAAAA"
// 目標(biāo)窗口
var targetlink="_blank"
// 標(biāo)題的字體屬性
var font_titleface="宋體"
var font_titlecolor="FFFFFF"
var font_titlesize=2
// 說(shuō)明的字體屬性
var font_copyface="宋體"
var font_copycolor="FFFFFF"
var font_copysize=2
// s設(shè)置 1 標(biāo)題為粗體, 0 為正常
var titlebold=1
// 說(shuō)明
var copybold=1
// 設(shè)置 'right', 'left' or 'center' 標(biāo)題對(duì)齊方式
var titlealign="right"
// 說(shuō)明
var copyalign="left"
// 停頓時(shí)間
var standstill=4000
var pre_titlebold
var after_titlebold
var pre_copybold
var after_copybold
var cliptop=0
var clipbottom=0
var clipleft=0
var clipright=titlezonewidth+copyzonewidth
var i_message=0
var mes_joined
var mes_split
var contenttext
var contentbg=""
var step=1
var pause=20
if (titlebold==1) {
pre_titlebold="
"
after_titlebold=""
}
else if (titlebold==0) {
pre_titlebold=""
after_titlebold=""
}
if (copybold==1) {
pre_copybold="
"
after_copybold=""
}
else if (copybold==0) {
pre_copybold=""
after_copybold=""
}
function initiate() {
mes_joined=message[i_message]
mes_split=mes_joined.split("|")
contenttext="
"
var bg_width=titlezonewidth+copyzonewidth+2*scrollerborder
var bg_height=scrollerheight+2*scrollerborder
contentbg="
"
if (document.all) {
scrollertext.innerHTML=contenttext
scrollerbg.innerHTML=contentbg
document.all.scrollertext.style.posTop=scrollertop+scrollerheight
document.all.scrollertext.style.posLeft=scrollerleft
document.all.scrollerbg.style.posTop=scrollertop-scrollerborder
document.all.scrollerbg.style.posLeft=scrollerleft-scrollerborder
document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
scrollin()
}
if (document.layers) {
document.scrollertext.document.write(contenttext)
document.scrollertext.document.close()
document.scrollerbg.document.write(contentbg)
document.scrollerbg.document.close()
document.scrollertext.top=scrollertop+scrollerheight
document.scrollertext.left=scrollerleft
document.scrollerbg.top=scrollertop-scrollerborder
document.scrollerbg.left=scrollerleft-scrollerborder
document.scrollertext.clip.left=clipleft
document.scrollertext.clip.right=clipright
document.scrollertext.clip.top=cliptop
document.scrollertext.clip.bottom=clipbottom
scrollin()
}
}
function scrollin(){
if (document.all){
if (document.all.scrollertext.style.posTop>scrollertop) {
clipbottom+=step
document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.scrollertext.style.posTop-=step
var timer=setTimeout("scrollin()",pause)
}
else {
clearTimeout(timer)
var timer=setTimeout("scrollout()",standstill)
}
}
if (document.layers){
if (document.scrollertext.top>scrollertop) {
clipbottom+=step
document.scrollertext.clip.left=clipleft
document.scrollertext.clip.right=clipright
document.scrollertext.clip.top=cliptop
document.scrollertext.clip.bottom=clipbottom
document.scrollertext.top-=step
var timer=setTimeout("scrollin()",pause)
}
else {
clearTimeout(timer)
var timer=setTimeout("scrollout()",standstill)
}
}
}
function scrollout(){
if (document.all){
if (document.all.scrollertext.style.posTop>(scrollertop-scrollerheight)) {
cliptop+=step
document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.scrollertext.style.posTop-=step
var timer=setTimeout("scrollout()",pause)
}
else {
clearTimeout(timer)
changemessage()
}
}
if (document.layers){
if (document.scrollertext.top>(scrollertop-scrollerheight)) {
cliptop+=step
document.scrollertext.clip.left=clipleft
document.scrollertext.clip.right=clipright
document.scrollertext.clip.top=cliptop
document.scrollertext.clip.bottom=clipbottom
document.scrollertext.top-=step
var timer=setTimeout("scrollout()",pause)
}
else {
clearTimeout(timer)
changemessage()
}
}
}
function changemessage(){
i_message++
if (i_message>message.length-1) {i_message=0}
mes_joined=message[i_message]
mes_split=mes_joined.split("|")
cliptop=0
clipbottom=0
contenttext="
"
if (document.all) {
scrollertext.innerHTML=contenttext
document.all.scrollertext.style.posTop=scrollertop+scrollerheight
document.all.scrollertext.style.posLeft=scrollerleft
document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
scrollin()
}
if (document.layers) {
document.scrollertext.document.write(contenttext)
document.scrollertext.document.close()
document.scrollertext.top=scrollertop+scrollerheight
document.scrollertext.left=scrollerleft
document.scrollertext.clip.left=clipleft
document.scrollertext.clip.right=clipright
document.scrollertext.clip.top=cliptop
document.scrollertext.clip.bottom=clipbottom
scrollin()
}
}
</script>