title: Display number of specific images in div
body: <p>What I would like is to count the number of src containing the name empty.jpg inside a div using javascript.
  Here is a sample of the code:</p>
  
  <pre><code>&lt;div id="up-bil"&gt;
  &lt;input name="billed" type="checkbox" value="" /&gt;
  &lt;img src="Lighthouse.jpg"/&gt;
  &lt;input name="billed" type="checkbox" value="" /&gt;
  &lt;img src="Lighthouse.jpg" /&gt;
  &lt;input name="billed" type="checkbox" value="" /&gt;
  &lt;img src="images.jpg" /&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
     var b = document.getElementById("up-bil").getElementsByTagName("img");
     b.getAttribute("src")=="empty.jpg";
     alert(b.length);
  &lt;/script&gt;
  </code></pre>
  
  <p>Nothing happens with this code.
  Can someone give me a clue what to do?</p>