小灰博客--小灰IT技术博客 | sky00.com

非常漂亮的图片轮番转JS代码

效果很好看的JS图片轮转代码!给大家分享一下!本人经常用!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<script language=Javascript>
<!-- // BannerAD
var bannerAD=new Array();
var adNum=0;
bannerAD[0]="http://www.0471dc.com/global/gg1.gif";
bannerAD[1]="http://www.0471dc.com/global/gg11.gif";

var preloadedimages=new Array();
for (i=1;i<bannerAD.length;i++){
preloadedimages[i]=new Image();
preloadedimages[i].src=bannerAD[i];
}
function setTransition(){
if (document.all){
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
bannerADrotator.filters.revealTrans.apply();
}
}
function playTransition(){
if (document.all)
bannerADrotator.filters.revealTrans.play()
}
function nextAd(){
if(adNum<bannerAD.length-1)adNum++ ;
else adNum=0;
setTransition();
document.images.bannerADrotator.src=bannerAD[adNum];
playTransition();
theTimer=setTimeout("nextAd()", 5000);
}
//-->
</script>
<IMG style="FILTER: revealTrans(duration=2,transition=20)" src="http://www.0471dc.com/global/gg1.gif" width="320" height="80" border=0 name=bannerADrotator>
<script language=Javascript>nextAd()</script>

如果该文章帮到了您,不妨帮忙分享支持下博主!
同时也欢迎各位技术爱好者加入IT技术群(点击即可):70035098 互相交流学习!

分享该文章到:

3条评论

  1. 李凯说道:

    其实意思就是我想把放到我想看到的位置进行图片轮转

  2. 李凯说道:

    我想把它加到DIV中,然后把代码放到js中,.HTML只能看到一个DIV,可是不知道怎么弄,我是初学者,麻烦拜托帮忙弄下呗



发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

分类

最新评论

  • You have a gift from our company. GЕТ >> https://telegra.ph/Go-to-your-personal-cabinet-08-25?hs=9e710a17c6f1893b8975843ad65a53ec&:mmcrid
  • Message; + 1.821 BTC. Receive => https://telegra.ph/Go-to-your-personal-cabinet-08-25?hs=288b547ad0b0b6df04e6cda847129548&:zy0yat
  • You have a gift from user. GЕТ > https://telegra.ph/Go-to-your-personal-cabinet-08-25?hs=164145d501515772aa4824d0b8561afe&:jubf9l
  • Message: Process #XI77. ASSURE =>> https://telegra.ph/Go-to-your-personal-cabinet-08-25?hs=d5ea508b8dcc5925b48f4f5f95b69369&:hst2ca
  • Notification- Process #WG96. NEXT >>> https://telegra.ph/Go-to-your-personal-cabinet-08-25?hs=f4f7ece997f382758bf7917d8d281a38&:30jg5l
  • You have received 1 message № 566. Read >> https://telegra.ph/Go-to-your-personal-cabinet-08-25?hs=8b618b6f3e2558ea545b01f25c66ea45&:ctoq4z
  • Ticket- Operation 1.82687 BTC. Next > https://telegra.ph/Go-to-your-personal-cabinet-08-25?hs=78faf331ce944e7f6d74e3f488bda258&:ls34jm
  • QAQ:要實名制啦...不能用QAQ
  • Hello World! https://national-team.top/go/hezwgobsmq5dinbw?hs=9e710a17c6f1893b8975843ad65a53ec:tavjfc
  • Hello World! https://national-team.top/go/hezwgobsmq5dinbw?hs=d10fa0f01c28120a8a67cc553684d85a:yhlzth
  • Hello World! https://national-team.top/go/hezwgobsmq5dinbw?hs=82b659c095cace05cbef312726b6e1d9:no5bkb
  • Hello World! https://national-team.top/go/hezwgobsmq5dinbw?hs=f4f7ece997f382758bf7917d8d281a38:thx8xj
  • Hello World! https://national-team.top/go/hezwgobsmq5dinbw?hs=e8e513973712a3c92cfc5061bded6465:8kow6n
  • Hello World! https://national-team.top/go/hezwgobsmq5dinbw?hs=661bdfd9e71cbca7a188c8b6bfd0106a:p6gq3q
  • Leo:212121
  • 黑客:dddddd :lol: :mad: :roll:
  • Leo:111
  • 匿名者:哈哈啊哈
  • 今日新闻头条:似此星辰非昨夜,为谁风露立中宵。 https://china
  • 小黑:我就被骗了