title: How to get attribute of div without ID
body: <p>My website contain lot of images and thats why i cannot give ID for each image it will be tedious task. I need to get the source attribute of image tag but i am not able to do it without ID.
  I did try for attr() and getAttribute() but it doesn`t seems to work for me.</p>
  
  <p><strong>My Code</strong></p>
  
  <pre><code>&lt;img src="./images/image1.jpg" width='100' height='100' alt='Sample image' onClick='imageInfo(this);'&gt;
  
  &lt;script&gt;
  function imageInfo()
  {
      alert(this.src);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>i am trying to get the source of image tag but it is not coming 
  i have also tried in jsfiddle but it is not working .</p>
  
  <p><a href="http://jsfiddle.net/hiteshbhilai2010/LgLzh/14/" rel="nofollow">JS FIDDLE LINK</a></p>