title: How to target image inside a div with an id with getelementbyid/tag/name?
body: <p>Basically I want to change smiley.gif to landscape.jpg without changing divs and tags, but this code is not working. 
  Any suggestions? </p>
  
  <pre><code>&lt;div id="foo"&gt;
  &lt;div id="bar"&gt;&lt;img src="smiley.gif"&gt;
  Hello world!
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;script&gt;
  getElementById("bar").getElementsByTagName("img").src="landscape.jpg";
  
  &lt;/script&gt;
  </code></pre>