dreamwear 问题,大家帮帮忙

来源:百度知道 编辑:UC知道 时间:2024/05/21 15:38:14
我记得以前好象在dreamwear里能够设置图片的轮流变化,就像flash里的广告一样的,但是不知道到底是怎么样做出来的,可能是我记错了,或许是没有这个功能的,请各位帮帮忙,有的话能把步骤告诉我吗?有急用

直接告诉你代码。。这次可别忘了啊~

<script language="JavaScript" type="text/JavaScript">
images1=new Array(); //可以放任意个图片,
text1=new Array();
imgurl1=new Array();
images1[1]="images/1.gif";
images1[2]="images/2.gif";
images1[3]="images/2.JPG";
imgurl1[1]="news/view.jsp?id=463";
imgurl1[2]="news/view.jsp?id=414";
imgurl1[3]="news/view.jsp?id=1214";
text1[1]="内容一";
text1[2]="内容二";
text1[3]="内容三";
speed1=5000; //变幻的速度,单位时毫秒
count=0;
move=1;
timer=null;

function AutoCycle(){
count+=move
if (count >= text1.length) count=1;
//document.write("afsdfsdf");
document.images.img1.src=images1[count];
document.getElementById('imgs').innerHTML = text1[count];
timer=setTimeout('AutoCycle()',speed1)
}