How do i access 'src' attribute of <img> tag in javascript?
<pre><code>&lt;html&gt;
&lt;head&gt;&lt;/head&gt;
&lt;body&gt;
&lt;div id="ctl00_ContentPlaceHolder1_ctl00_ctl01_Showcase"&gt;
&lt;div style="width:100%;text-align:center;"&gt;&lt;img src="http://www.xyz.com/aaa.gif" id="ctl00_ContentPlaceHolder1_ctl00_ctl01_loderImg" alt="Loading" /&gt;&lt;/div&gt;        &lt;/div&gt;
&lt;script&gt;
q= document.getElementById('ctl00_ContentPlaceHolder1_ctl00_ctl01_Showcase').childNodes[1].getAttribute('src').innerHTML;

alert(q);

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>how do i access 'src' attribute of img tag ? im above code it gives null value so whats wrong ? </p>
