change the style of img inside a div tag
<p>Example:</p>

<pre><code>&lt;div class="test"&gt;&lt;img src="test.jpg" style="display:none;" /&gt;&lt;/div&gt;
</code></pre>

<p>How to change that with javascript, I know in css its:</p>

<pre><code>.test img {display:block;}
</code></pre>

<p>but in javascript I only know this:</p>

<pre><code>document.getElementById("test").style.display="block";
</code></pre>

<p>thats obviously the whole div tag , not the img.</p>
