JavaScript切换图片

JavaScript切换图片


子衿沉夜
浏览 682回答 2
2回答

慕丝7291255

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><script language="JavaScript">var k=0;var imgname1="image/";var imgname2=".jpg";var imgnub=3;function start(){obj=eval("img1");if (obj.filters.item(0).Transition==23)obj.filters.item(0).Transition=1;elseobj.filters.item(0).transition++;obj.filters.item(0).Apply();if (k<imgnub) {k++;}else {k=1;}obj.src=imgname1+k+imgname2;obj.filters.item(0).Play();setTimeout("start(1)",3000);}</script></head><body onload="start()"><img&nbsp;id="img1" src="image/0.jpg" style="filter:revealTrans(Transition=2,Duration=1.5)"></body>这样OK了么,,个数和时间,图片名称,路径,自己改
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript