藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

請教一段代碼,關於每次刷新圖片變化

http://www.xcyz.cn

中間的四張圖片,我想讓每次訪問者刷新一下,圖片就不變化一次,
以前見過這個代碼,後來忘記了.

請問下大家!

頂下,希望大家幫忙啊~

你是說每刷新一次圖片變嗎?

[html]
<body>
<script LANGUAGE="JavaScript">
<!-- Begin var how_many_ads = 3; var now = new Date() var sec = now.getSeconds() var ad = sec % how_many_ads; ad +=1; if (ad==1) { txt="這裡是廣告條一的文字說明"; url="http://www.yourlink1.com"; alt="網站名稱一"; banner="image1.gif"; width="140"; height="40"; } if (ad==2) { txt="這裡是廣告條二的文字說明"; url="http://www.yourlink2.com/"; alt="網站名稱二"; banner="image2.gif"; width="140"; height="40"; } if (ad==3) { txt="這裡是廣告條三的文字說明"; url="http://www.yourlink3.com"; alt="網站名稱三"; banner="image3.gif"; width="140"; height="40"; } document.write('
'); document.write('' + txt + ''); document.write('
'); // End -->
</script>
</body>
[/html]

圖片就不變化一次???
沒見過這個也需要代碼?




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com