<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "Text/html;charset=utf-8" /><title></title><styletype= "Text/css"></style><HTML><Head></Head><Body><H1>Snaphot</H1> <Li> <ahref= "Img/c.jpg"title= "AAA" >Aaa</a> </Li> <Li> <ahref= "Img/02.jpg"title= "BBB">Bbb</a> </Li></ul><imgID= "Placeholder"src= "Img/c.jpg"alt= "My img"></Body></HTML><Script>functionShowpic (e) {varSource= This. getattribute ("href"); varplaceholder=document.getElementById ("placeholder"); Placeholder.setattribute ('src', source); Window.event.returnValue= false; };varAarray=document.getElementsByTagName ('a'); for(varI=0; I<Aarray.length;i++) {Aarray[i].addeventlistener ('Click', Showpic,false);}</Script></Body></HTML>
Use the DOM and JS functions to show the picture the user wants to see on the current page