我为我的网站创建了一个手动幻灯片放映" next"和"之前"按钮和我尝试在图片过渡期间使用淡入淡出效果,但我在网上找到的所有java代码都不能使用我的代码(我是新手)
对不起我的英文,谢谢你的帮助!
var num=1
img1 = new Image ()
img1.src = "/images/image1.jpg"
img2 = new Image ()
img2.src = "/images/image2.jpg"
img3 = new Image ()
img3.src = "/images/image3.jpg"
img4 = new Image ()
img4.src = "/images/image4.jpg"
function slideshowUp()
{
num=num+1
if (num==5)
{
num=1
}
document.mypic.src=eval("img"+num+".src")
document.joe.burns.value=eval("text"+num)
}
function slideshowBack()
{
num=num-1
if (num==0)
{
num=4
}
document.mypic.src=eval("img"+num+".src")
document.joe.burns.value=eval("text"+num)
}
<div style="position:absolute;top:50px;left:200px;width:423px;height:565px;">
<IMG SRC="/images/image1.jpg" NAME="mypic" BORDER=0 HEIGHT="480" WIDTH="720"></div>
<p>
<FORM NAME="joe">
</FORM>
<p style="position:fixed;left:200px;top:540px;text-align: right;"><span style="font-family: 'arial' sans serif; font-size: 8pt;"><A HREF=""JavaScript:slideshowBack()">prev</a> | <A HREF="JavaScript:slideshowUp()">next</a></span></p>