title: Javascript - Change element's src in specified element
body: <p>In html I have a lot od DIVs with names(yes, names, not IDs) respectively p001, p002, p003... which are like this:</p>
  
  <pre><code>&lt;div id="pole" name="p001"&gt;&lt;img src=""&gt;&lt;/div&gt;
  &lt;div id="pole" name="p002"&gt;&lt;img src=""&gt;&lt;/div&gt;
  &lt;div id="pole" name="p003"&gt;&lt;img src=""&gt;&lt;/div&gt;
  </code></pre>
  
  <p>etc...</p>
  
  <p>In Javascript I have defined variable called 'pos' which contains a number, for now: "284"
  and a function which should change img src to "player.png". 
  I tried 2 ways and none of these work:</p>
  
  <pre><code>document.getElementsByName('p'+pos).innerHTML='&lt;img src="player.png"&gt;';
  </code></pre>
  
  <p>and</p>
  
  <pre><code>document.getElementsByName('p'+pos).getElementsByTagName("img").src="player.png";
  </code></pre>
  
  <p>How to change img src which is in specified DIV?</p>