Without knowing what the IfClick function is supposed to do,
I just put an alert message into this template of code
you could modify further.
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<title> Untitled </title>
<style type="text/css">
.pics { height:100px; width:100px; border:1px solid blue; margin:1px 4px; }
</style>
</head>
<body>
<div id="tbl"></div>
<script type="text/javascript">
var baseURL = 'http://www.nova.edu/hpd/otm/pics/4fun/';
var PickImg = [
['11.jpg','12.jpg','13.jpg','14.jpg','15.jpg'],
['21.jpg','22.jpg','23.jpg','24.jpg','25.jpg'],
['31.jpg','32.jpg','33.jpg','34.jpg','35.jpg'],
['41.jpg','42.jpg','43.jpg','44.jpg','45.jpg'],
['51.jpg','52.jpg','53.jpg','54.jpg','55.jpg']
];
var str = "";
for (var i=0; i<PickImg.length; i++) {
str +="\n";
for (var j=0; j<PickImg[i].length; j++) {
str += "<img src='"+baseURL+PickImg[i][j]+"' class='pics' onclick='alert(this.src)'>";
}
str += "\n<br>";
}
document.getElementById('tbl').innerHTML = str;
</script>
</body>
</html>
Have fun!
