Mellan <HEAD> och </HEAD>:
<script language="JavaScript">
function imgPopup(url,x,y){
MyWin = window.open("","","width=" + x + ",height=" + y + ",toolbar=no,location=no,directories=no,status=no,menubar=no");
with(MyWin.document){
open();
write("<html>\n<head>\<title>Titel</title>\n</head>\n<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 rightmargin=0>\n");
write("<img src=\"" + url + "\" width=\"" + x + "\" height=\"" + y + "\">\n");
write("</body>\n</html>\n");
close();
}
}
</script>
Där du ska ha bilden som du klickar på:
<a href="JavaScript:imgPopup('bild.jpg', 300,400);"><img src="litenbild.jpg" width="80" height="80" class="bild"></a>