title: Javascript : get <img> src and set as variable?
body: <p>If the img below is present</p>
  
  <pre><code>&lt;img id="youtubeimg" src="http://i1.ytimg.com/vi/VK4ah66jBvE/0.jpg"/&gt;
  </code></pre>
  
  <p>and the script is</p>
  
  <pre><code>&lt;script&gt;
  var youtubeimgsrc = "something here"
  
  document.write(''+youtubeimgsrc+'')
  &lt;/script&gt;
  </code></pre>
  
  <p>and the result should be <code>http://i1.ytimg.com/vi/VK4ah66jBvE/0.jpg</code></p>
  
  <p>what can i do to get the image source and set as a variable.</p>