title: Can Access to an Html element without document.getElementById()?
body: <p>i wrote a sample Html page that contain a img and change src of img with code </p>
  
  <pre><code>&lt;img id='p6'/&gt;
  
  document.getElementById('p6').src='somting.jpg';
  </code></pre>
  
  <p>when i write code in  tag find that i can write this code instead of above code:</p>
  
  <pre><code>p6.src='somting.jpg';
  </code></pre>
  
  <p>and it work perfectly...can anyone say to me what happend in this code? and realy we can access Html element whitout use document.getElementById() ?</p>