标题:
网页之多变的图象导航特效
[打印本页]
作者:
zw2004
时间:
2008-1-21 20:51
标题:
网页之多变的图象导航特效
<script language=JavaScript>
1 M- { L- |: `* _- Y3 \
<!-- // BannerAD
; u) ^1 T9 X$ [# J6 R# s2 Z. i
6 s, B3 G/ ^. s$ h5 ^4 X
var bannerAD=new Array();
' n7 s# i0 D; x9 A9 i5 Q3 |. u
var bannerADlink=new Array();
/ ?; m6 V P1 g. r- K" i
var adNum=0;
# S9 d- E( V& s& R j) \9 A
//修改下面的图片地址和相应的链接地址
& M) g7 W* j) \+ V7 o8 U Y
bannerAD[0]="../../image/01s.jpg";
) @: y; E9 e6 l, E2 Z3 G
bannerADlink[0]="../../index.asp";
% _+ b8 U7 Q1 T' J
bannerAD[1]="../../image/02s.jpg";
2 W9 t3 Y" f5 [1 K9 U
bannerADlink[1]="../wytx.htm";
4 [4 Q, m7 H2 [6 o
bannerAD[2]="../../image/03s.jpg";
6 Y: B- H. X+ h# f
bannerADlink[2]="../../sxym/sxym.htm";
0 ]! q! `- h. v z
bannerAD[3]="../../image/04s.jpg";
8 D( v% c" [3 l0 h. K( K
bannerADlink[3]="http://www.jzzy2.com";
3 ^+ s3 `8 a1 ?5 N; ^, P
bannerAD[4]="../../image/05s.jpg";
* b0 y. X& o7 Y: h D$ A
bannerADlink[4]="http://www.cwdcn.com/";
* t$ {! ?7 t: I4 e
bannerAD[5]="../../image/03s.jpg";
' T- L8 T1 U/ o: y8 e7 W! W0 F
bannerADlink[5]="http://www.jzzy3.com";
7 Z& t @! Z$ [
" e$ ?: _$ h9 A+ Q. I1 g
var preloadedimages=new Array();
1 Y. K" o" y6 l1 ~/ @2 U
for (i=1;i<bannerAD.length;i++){
8 G3 g, k' _) H" q i. [2 b& z/ b* z; J
preloadedimages
=new Image();
* O9 D, b, k! e1 `# ~+ E
preloadedimages
.src=bannerAD
;
# h% t' U/ L% N, J9 M5 n
}
+ U! R) f6 p4 n. {( {
6 ]; o# L0 f7 g Q& {9 V
function setTransition(){
1 N% ?8 i3 W) e5 N3 _$ m
if (document.all){
! Y C% d! n( S% w+ W: n$ h1 l/ ?& |
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
; K7 [; b9 S% v( d' g
bannerADrotator.filters.revealTrans.apply();
2 @& y! D/ K& x' n8 o
}
+ n% L& g) ?1 l7 M% x" j- n
}
$ I1 T9 ]/ n. j9 f; J
6 g$ a# B% p7 ]0 }' v* P0 ?0 Z
function playTransition(){
0 R- H4 p6 |, A D
if (document.all)
$ j7 r9 I# i6 ?5 ^1 \ k( N
bannerADrotator.filters.revealTrans.play()
0 U: u3 |! i' Y8 d! h7 n9 D! M" k
}
7 c6 y2 B+ a5 J6 N. c ~6 \
) k) T& ]* j3 G4 B- v- J
function nextAd(){
, [" U6 T) u: D
if(adNum<bannerAD.length-1)adNum++ ;
, E. `& [; {# W: E, a
else adNum=0;
, n9 t: y$ c; |
setTransition();
$ A5 i2 T0 ?' b. A3 M7 U. F
document.images.bannerADrotator.src=bannerAD[adNum];
0 n: y6 u0 v9 m" O" P+ g$ o
playTransition();
$ B8 {. ]3 { f6 V4 n
theTimer=setTimeout("nextAd()", 5000);
8 A0 ^* `: S2 B( O; A/ G
}
- K) K8 n, s8 Q6 d' P) Z- n
5 ` a: E E; E8 p
function jump2url(){
5 A2 n8 b2 ?* d; b4 i8 C! \5 z
jumpUrl=bannerADlink[adNum];
+ h- o8 F1 t$ y; O
jumpTarget='_blank';
8 l, d% U* e0 }- [3 c. w
if (jumpUrl != ''){
8 o. q7 M6 Q0 H7 Y, H
if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
! i/ ^* l' H% X) r5 T! t
else location.href=jumpUrl;
" X. M; i, s$ t' K' P& J* y
}
0 S, q2 ]) Q4 \+ A, I$ v
}
1 Z! l# r& V9 R b. q, ^
function displayStatusMsg() {
/ c( i; x: N5 M9 b
status=bannerADlink[adNum];
( R0 x1 g( |' ]6 }0 x; h
document.returnValue = true;
+ w; _2 D2 O) b* `. I
}
% O6 f( }& h8 v9 c
, l( Q' o3 T/ {& M7 `
//-->
5 c2 G4 g7 B) U: J7 x
</script>
" A. {/ N# y' o9 O
//修改下面的图片的宽度和高度、地址
0 S2 q2 W/ m ^4 c
<A onmouseover="displayStatusMsg();return document.returnValue"
3 s. l2 S1 `' X
href="javascript:jump2url()"><IMG
' h1 s: a: Q- j- Y2 s& v
style="FILTER: revealTrans(duration=2,transition=20)" height=66
7 p& ]+ l, u1 l5 x/ M
src="../../image/02s.jpg" width=400 border=1
9 e3 V( ?- U5 |# {* V3 t
name=bannerADrotator>
) T5 ]' `# p% \3 M+ j6 _4 H. ]* C
</A>
* Q% B; F# p( T7 S P
<SCRIPT language=JavaScript>nextAd()</SCRIPT>
欢迎光临 捌玖网络工作室 (http://www.89w.org/)
Powered by Discuz! 7.2