var picURL = ["images/img1.jpg","images/img2.jpg","images/img3.jpg"]//将图片链接地址放进来,数量随意
function showimg(str){
if(str=="L"){
if(picID==0){
picID = picURL.length-1
document.getElementById("advimg").src = picURL[picID]
}else{
document.getElementById("advimg").src = picURL[--picID]
}
}else if(str=="R"){
if(picID==(picURL.length-1)){
picID = 0
document.getElementById("advimg").src = picURL[picID]
}else{
document.getElementById("advimg").src = picURL[++picID]
}
}
}
你都在用jQuery了为什麼要用这麽别扭的方式搞特效?
<div class="SlideWrapper" style="display:none"><img src="yourImage">
</div>
<script>
jQuery(function($)
{
$('.SlideWrapper').slideDown(4000)
})
<script>