<div id="flash"> <script type="text/javascript"> var widths = 865; /*显示高度,自行调整*/ var heights = 255; /*显示宽度,自行调整*/ var counts = 5; img1 = new Image(); img1.src = 'images/flash_07.jpg'; img2 = new Image(); img2.src = 'images/flash_071.jpg'; img3 = new Image(); img3.src = 'images/flash_072.jpg'; img4 = new Image(); img4.src = 'images/flash_073.jpg'; img5 = new Image(); img5.src = 'images/flash_074.jpg'; //url1=new Image ();url1.src=''; //图片点击的网页链接 //url2=new Image ();url2.src=''; //url3=new Image ();url3.src=''; //url4=new Image ();url4.src=''; //url5=new Image ();url5.src=''; /* 建议将这块放置于JS中 下面的部分几乎是不需要任何改动*/ var nn = 1; var key = 0; function change_img() { if (Sys.ie) { document.getElementById("pic").filters[0].Apply(); document.getElementById("pic").filters[0].Play(duration = 2); //} eval('document.getElementById("pic").src=img' + nn + '.src'); //eval('document.getElementById("url").href=url'+nn+'.src'); nn++; if (nn > counts) { nn = 1; } tt = setTimeout('change_img()', 7000); } else { if (key == 0) { key = 1; } else if (document.all) { document.getElementById("pic").filters[0].Apply(); document.getElementById("pic").filters[0].Play(duration = 2); } eval('document.getElementById("pic").src=img' + nn + '.src'); //eval('document.getElementById("url").href=url'+nn+'.src'); nn++; if (nn > counts) { nn = 1; } tt = setTimeout('change_img()', 7000); } } //function changeimg(n){nn=n;window.clearInterval(tt);change_img();} document.write('<div><a id="url" ><img id="pic" style="border:0px; filter:progid:dximagetransform.microsoft.wipe(gradientsize=2.0,wipestyle=4, motion=forward)" width=' + widths + ' height=' + heights + ' /></a></div>'); //for(var i=1;i<counts+1;i++){document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+i+'</a>');} change_img(); </script> </div>