I am trying to get the src of an image to be based on sky+gatMap()+.jpg The src is supposed to be sky#.jpg where # is the value of getMap(). I am having trouble with the quotation or something, what am I doing wrong here?
<script type="text/javascript">
document.write("<img id='sky' src='sky+mapNum()+.jpg' alt='' />");
</script>
This is a case problem out of a javaxcript book. It doesn't tell me how to do this.
document.write("<img id='sky' src='sky"+mapNum()+".jpg' alt='' />");