according to the code typed out according to the part of javascript dom programming art about displaying pictures on a web page, there is a section that needs to enter onclick= "showPic (this); return false;" to prevent the page from popping up a new link to view the picture, but finally a new link pops up when it is run. The specific code is as follows:
< hr ><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>My Gallery</title>
</head>
<body>
<h1>snapshots</h1>
<ul>
<li>
<a href="images/do or die.jpg" onclick="showPic(this);return false;" title="do or die">DO</a>
</li>
<li>
<a href="images/hand.jpg" onclick="showPic(this);return false;" title="hand">HAND</a>
</li>
<li>
<a href="images/phrase.jpg" onclick="showPic(this);return false;" title="phrase">Phrase</a>
</li>
</ul>
<img id="placeholder" src="images/dog.jpg" alt="My Gallery"/>
<script>
function showPic(whichpic)
{var source=whichpic.getAttribute ("href");
var placeholder=document.getElenmentById ("placeholder");
placeholder.setAttribute("src",source);}
</script>
</body>
</html>