locbtran Posted February 8, 2011 Share Posted February 8, 2011 I'm sorry if this question seem very basic but I just start learning javascript.I would like to display an image but not sure why it is not working. In a nutshell, here's my code <html><head></head><body><script type="text/javascript">document.writeln("<img src=/"xMark.jpg /" width=25 height=25 >");</script></body></html> thanks Link to comment Share on other sites More sharing options...
boen_robot Posted February 8, 2011 Share Posted February 8, 2011 Change "/" to "\", like: <html><head></head><body><script type="text/javascript">document.writeln("<img src=\"xMark.jpg\" width=25 height=25 >");</script></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.