实现简单相册
<! DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.0 Transitional//EN " > < HTML > < HEAD > < TITLE > New Document </ TITLE > </ HEAD > < style type = " text/css " > <!-- div#div1 ... {height:240px; filter:BlendTrans(duration=1);} --> </ style > < SCRIPT LANGUAGE = " JavaScript " > <!-- var i = 1 ; function play() ... { if(i<6) ...{ var div1=document.getElementById("div1"); div1.filters[0].apply(); i=i+1; div1.innerHTML="<img src='"+i+".jpg' alt='' height=300 width=300 />"; div1.filters[0].play(); } } function play1() ... { if(i<=6&&i>1) ...{ var div1=document.getElementById("div1"); div1.filters[0].apply(); i=i-1; div1.innerHTML="<img src='"+i+".jpg' alt='' height=300 width=300 />"; div1.filters[0].play(); } } // --> </ SCRIPT > < BODY > < div id = " div1 " > < img src = " 1.jpg " alt = "" height = " 300 " width = " 300 " /> </ div > < SCRIPT LANGUAGE = " JavaScript " > </ SCRIPT > < input type = " button " value = " 下一张 " id = " btn1 " onclick = " play() " /> < input type = " button " value = " 上一张 " onclick = " play1() " /> </ BODY > </ HTML >