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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -