我写了一些使图像正确滑动的代码。但我想添加过渡效果。
这是我目前的代码:
<script type="text/javascript">
var image1 = new Image()
image1.src = "7.jpg"
var image2 = new Image()
image2.src = "268939_234023119951136_1441221_n.jpg"
</script>
<p><img src="142357419110524688_932580683437050_8134682163687368860_n.jpg" width="500" height="300" name="slideaa" /></p>
<script type="text/javascript">
var step=1;
function slideit()
{
document.images.slide.src = eval("image"+step+".src");
if(step<2)
step++;
else
step=1;
setTimeout("slideit()",2500);
}
slideit();
</script>