怎样修改以下 三屏 网页图片 切换效果 js代码?
<!--把下面代码加到<head>与</head>之间--><scriptlanguage="javascript"><!--varSlideShowSpeed=4000...
<!--把下面代码加到<head>与</head>之间-->
<script language="javascript">
<!--
var SlideShowSpeed = 4000;
var CrossFadeDuration = 8;
var Picture = new Array(); //don't change this
var Caption = new Array(); //don't change this
Picture[1] = '/images/banner2.gif';
Picture[2] = '/images/banner3.gif';
Picture[3] = '/images/banner4.gif';
Picture[4] = '/images/banner5.gif';
Picture[5] = '/images/banner6.gif';
Picture[6] = '/images/banner4.gif';
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
//-->
</script>
</head>
<!--把<body>改为-->
<body onload="runSlideShow();">
<!--把下面代码加到<body>与</body>之间-->
<table cellspacing="0" cellpadding="0" width="540" align="center" border="0" class="in_banner">
<tr>
<td align="center"><img id="PictureBox" name="PictureBox" width="540" height="130" src="/images/banner.gif"></td>
</tr>
</table>
</body> 展开
<script language="javascript">
<!--
var SlideShowSpeed = 4000;
var CrossFadeDuration = 8;
var Picture = new Array(); //don't change this
var Caption = new Array(); //don't change this
Picture[1] = '/images/banner2.gif';
Picture[2] = '/images/banner3.gif';
Picture[3] = '/images/banner4.gif';
Picture[4] = '/images/banner5.gif';
Picture[5] = '/images/banner6.gif';
Picture[6] = '/images/banner4.gif';
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
//-->
</script>
</head>
<!--把<body>改为-->
<body onload="runSlideShow();">
<!--把下面代码加到<body>与</body>之间-->
<table cellspacing="0" cellpadding="0" width="540" align="center" border="0" class="in_banner">
<tr>
<td align="center"><img id="PictureBox" name="PictureBox" width="540" height="130" src="/images/banner.gif"></td>
</tr>
</table>
</body> 展开
1个回答
2011-04-21
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询