var widths=310; /*显示高度*/ var heights=350; /*显示宽度*/ var counts=5; /*照片数量*/ var i = 1; var j = 1; img1=new Image ();img1.src='../Upload/PicFiles/201010251429239649.jpg'; url1=new Image ();url1.src='/Journals_View.asp?ID=704&SortID=11'; img2=new Image ();img2.src='../Upload/PicFiles/201010232143487558.jpg'; url2=new Image ();url2.src='/Journals_View.asp?ID=702&SortID=18'; img3=new Image ();img3.src='../Upload/PicFiles/2010619947468508.jpg'; url3=new Image ();url3.src='/Journals_View.asp?ID=696&SortID=7'; img4=new Image ();img4.src='../Upload/PicFiles/201110201335156054.jpg'; url4=new Image ();url4.src='/Journals_View.asp?ID=693&SortID=2'; img5=new Image ();img5.src='../Upload/PicFiles/2010617143114321.jpg'; url5=new Image ();url5.src='/Journals_View.asp?ID=692&SortID=3'; /* 以下基本不需要改动,不过当你涉及到改动变量和参数的时候 ,当然也有改动的必要*/ var nn = 1; var key = 0; function change_img() { 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"); for (var i = 1; i <= counts; i++) { document.getElementById("xxjdjj" + i).className = "axx"; } document.getElementById("xxjdjj" + nn).className = "bxx"; nn++; if (nn > counts) { nn = 1; } //图片切换的时间间隔 tt = setTimeout("change_img()", 4000); } function changeimg(n) { nn = n; window.clearInterval(tt); change_img(); } document.write(""); document.write("
"); document.write("
"); document.write("
"); for (var i = 1; i < counts + 1; i++) { document.write("" + i + ""); } document.write("
"); change_img();