title: Javascript onclick image display alt-tag in inputbox
body: <p>I got a basic question about an onclick event with an image.
  I have four images that are products with a price. The price is in the Alt-tag (for simplicity all 100 now). See the HTML below:</p>
  
  <pre><code>&lt;img src="product1.png" alt="100" onclick="pricecheck();" id="product1" /&gt;
  &lt;img src="product2.png" alt="100" onclick="pricecheck();" id="product2" /&gt;
  &lt;img src="product3.png" alt="100" onclick="pricecheck();" id="product3" /&gt;
  &lt;img src="product4.png" alt="100" onclick="pricecheck();" id="product4" /&gt; &lt;br /&gt;
  
  &lt;label for="Price" &gt;Price:&lt;/label&gt;&lt;input type="text" name="price"/&gt;&lt;br /&gt;            
  &lt;label for="totaal"&gt;Total:&lt;/label&gt;&lt;input type="text" name="total"/&gt;
  </code></pre>
  
  <p>I just don't know how to make a function that will show the alt-tag in the input "price" when you click on the image. the input "total" should be able to show the total price of all the images(products) that were clicked on.</p>
  
  <p>I hope you guys could help me out with this.</p>
  
  <p>Greetings</p>