当前位置: 首页 > 图文教程 > 网页制作 > HTML/XHTML教程 > 擦除式图片轮番显示效果

HTML/XHTML教程
动态HTML教程(四)
式样单的例子
主页制作ABC---XYZ
给你的网页加上两种以上的文字链接效果
动态HTML教程(五)
CSS图象滤镜之实用版
制作精美圆角表格两种方法
深入透析样式表滤镜(下)
用CSS巧控制段落缩进
用CSS实现鼠标单击特效
深入透析样式表滤镜(上)
CSS样式表高效使用的技巧
用CSS控制网页总体风格
XHTML+CSS:调用样式表
用CSS打造韩式风格网站
用CSS轻松实现网上填空
HTML编写小经验
MIME Type 引出的两难困境
CSS实例:横线样式的输入框
声音层叠样式表单

HTML/XHTML教程 中的 擦除式图片轮番显示效果


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-04   浏览: 66 ::
收藏到网摘: n/a

加在< head>中

< SCRIPT LANGUAGE="JavaScript">
//more javascript from http://www.smallrain.net
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'jsimg/1.jpg'
Pic = 'jsimg/2.jpg'
Pic = 'jsimg/3.jpg'
Pic = 'jsimg/4.jpg'
Pic = 'jsimg/5.jpg'
Pic = 'jsimg/6.jpg'
Pic = 'jsimg/7.jpg'
Pic = 'jsimg/8.jpg'
Pic = 'jsimg/9.jpg'
Pic = 'jsimg/10.jpg'


// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
< /script>

加在< body>中

< table border="0" cellpadding="0" cellspacing="0">
< tr>
< td id="VU">
< img src="/upload/tech/20091104/20091104153422_5e388103a391daabe3de1d76a6739ccd.jpg" name='SlideShow' width=388 height=415>
< /td>
< /tr>
< /table>