previous

page 23

next
ships.js
// <img src='images/ships/3.png' class='ship' id='s6'>
function ships() {
var sn=1;
for (var fn=1;fn<5;fn++) {
var s1="<img src='images/ships/";
var s2=".png' class='ship' id='s";
var s3="'>";
document.write(s1+fn+s2+sn+s3);
sn++;
document.write(s1+fn+s2+sn+s3);
sn++;
}
}
index.html
<script src='ships.js'></script>
<body>
<div id='main'>
<div id='squares'>
<script>
squares(); seed(); do_counters();
</script>
</div>
<div id='shapes'>
<script>shapes();</script>
</div>
<div id='ships'>
<script>ships();</script>
</div>
</div>
</body>
previous
next