JavaScript img src based on function variable -
i trying src of image based on sky+gatmap()+.jpg src supposed sky#.jpg # value of getmap(). having trouble quotation or something, doing wrong here?
<script type="text/javascript"> document.write("<img id='sky' src='sky+mapnum()+.jpg' alt='' />"); </script>
this case problem out of javaxcript book. doesn't tell me how this.
<script type="text/javascript"> document.write("<img id='sky' src='sky"+mapnum()+".jpg' alt='' />"); </script>
Comments
Post a Comment