//修改宽度& S( A* n/ a& u
var marqueewidth=300- _! F4 o) }" c
//高度 9 C4 u ^. b" \! }% [" [( gvar marqueeheight=25 # O+ ]9 s0 H( G+ u- b//速度(1-10)0 d6 X5 [/ i# U8 M# ^# w% y
var marqueespeed=33 ?9 K/ V; V+ Z5 g$ b$ ]
//背景颜色 7 g: M, I' i- i+ Dvar marqueebgcolor="#FFFFFF"4 M' c) y4 w: S. n( L% B2 U4 a* q. ^
//是否能暂停 (0=no. 1=yes)? 2 N( S% r4 m/ {, n& ~var pauseit=1! i4 i/ g3 h8 H+ z' F8 l9 [6 h) i
, q- u, B+ Y, R//修改显示内容* i2 T) C o/ E0 r
var marqueecontent='<nobr><font face="Arial" size=2><a href="http://www.jzzy.com/js.asp">欢迎光临七色风网页家园</a>--这里有从上千个网页特效中精选的300多个实用的特效,另外,为了网友更方便地学习,我们还改写和编写了部分的特效,并作了详细的说明和必要的使用提示!</font></nobr>' 6 M8 ]- N5 P- m6 N: v L5 J4 p' w% F8 \ ]
$ r; {: S/ Q+ T. s////下面不需改变////////////8 p% D" n7 m& W
# b) f3 h$ I. z: ^var copyspeed=marqueespeed+ A4 a7 S% v' g I R/ J: w
var pausespeed=(pauseit==0)? copyspeed: 0" b3 O6 l% P5 p2 s8 Q. L: n" l
var iedom=document.all||document.getElementById: Z7 S$ }! c9 R8 i
if (iedom)2 `) ^* F5 P, U0 C( U
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-1000">'+marqueecontent+'</span>'). D& `/ w! i7 [/ U: \
var actualwidth='' 3 l6 h0 H- H$ E7 p5 B3 Fvar cross_marquee, ns_marquee% k. e* f( b- s: l: V& w
0 k% Q# a* _. H$ W y6 |8 Q( o; b( T, [
function populate(){ , C( E7 i* C# A# Hif (iedom){ : J; q; y/ T) N; H2 ecross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee 4 e4 l+ ^3 ]# O$ t6 Y# N, f* n# i! mcross_marquee.style.left=marqueewidth+8 t6 g! Q1 \ a6 A: @
cross_marquee.innerHTML=marqueecontent2 e- {7 b6 @5 U9 u' P$ `! {
actualwidth=document.all? cross_marquee.offsetWidth : document.getElementById("temp").offsetWidth4 k3 C0 [! A- e' u' s
} ' Y" Q) P4 Z& R5 b+ Telse if (document.layers){ 0 D$ U# R% q& b. Z6 |ns_marquee=document.ns_marquee.document.ns_marquee2 : {1 |% i7 m0 ?# }5 jns_marquee.left=marqueewidth+8 1 h! o: q6 `9 K9 ^ns_marquee.document.write(marqueecontent) - Q; [7 H& Y& uns_marquee.document.close() * @% B- I. z! a5 e0 Mactualwidth=ns_marquee.document.width2 z+ `# e, j* [8 D
}7 H+ W0 g+ P* }8 Z5 [
lefttime=setInterval("scrollmarquee()",20) * B9 u' |) F6 v7 X9 o! ~ B' B}/ @4 Y3 @7 H- ^: j5 |* T
window.onload=populate* c, L/ M. w4 e$ n
e9 ^/ L9 \+ f' R9 G( `0 e( Y
function scrollmarquee(){ ! J, f1 D1 t" Z5 X& |: qif (iedom){, i2 ~9 T+ o1 p2 C; D" a. h
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8)) " V4 j/ O8 B. D V. {$ C3 q* {cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed* I2 W& \: M9 B: \* P( w8 @5 @
else& z+ t/ i: S0 C- \2 s" C) c; ]: P8 w' G
cross_marquee.style.left=marqueewidth+8( w( O8 |9 y/ o+ x7 {' e" N/ j, Y6 U7 [: ^
3 `5 i" R$ q# g) p* |& S! _! L
} 4 t' |5 X" h% U/ c# w. V0 m( {* m6 ?else if (document.layers){ * _( H2 t- p, h5 sif (ns_marquee.left>(actualwidth*(-1)+8)) 9 ^4 m2 ^+ N% h. P3 Zns_marquee.left-=copyspeed " ~2 Q+ Q6 M% h( H/ G* |5 oelse# `3 s0 r3 H9 q6 A4 n% ^
ns_marquee.left=marqueewidth+8. j8 T! ^" X% K8 W% O5 K$ v% w: o
} & Y, U9 \" g; J+ y+ K} . {, u5 b! @) o- o' p- S1 B$ f; S$ Q4 n% K! s
if (iedom||document.layers){ $ b& Q" e* P! }1 G: m6 Lwith (document){3 ]- }& _. ~0 {/ e9 |9 S
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')1 p& J4 v d/ e k5 ^; m! B1 r' B! u: ?
if (iedom){ + I# T6 V5 B0 W8 [( w) ~write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">') F7 \2 M' h) r& Twrite('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')( m8 C1 H1 w0 M, ]5 ~: L
write('<div id="iemarquee" style="position:absolute;left:0;top:0"></div>')5 D7 h5 w9 \" i, M
write('</div>')9 N7 D @1 i+ t( \4 y6 N# M* T
} 0 G# q" O9 A8 X+ J# |else if (document.layers){ c% K8 d- D* t! J+ J& Y& S+ Qwrite('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>'): a8 A4 Y& f( m2 A# O
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')0 v7 ^1 Y, i; `: @
write('</ilayer>') ! y0 x+ p% r) R: l2 ~! Y} - l2 W, I: n/ jdocument.write('</td></table>') B9 b8 f5 P* J& J( u2 z6 I' c} " y& o: S( J3 y$ I$ Q) P8 m} % ?1 \4 k4 e+ `) h' p4 M. z</script>