title: Javascript to get and change element Title
body: <p>I want to change images inside a div when a link is clicked. I did that, but I can't retrieve the TITLE of the image from the TITLE of the link.</p>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>function changeImage(element) {
      document.getElementById('imageReplace').src = element;
  }
  </code></pre>
  
  <p><strong>HTML 1</strong></p>
  
  <pre><code>&lt;a href="#" title="PIC1" onclick="changeImage('pics/1.jpg');return false;"&gt;my link&lt;/a&gt;
  </code></pre>
  
  <p><strong>HTML 2</strong></p>
  
  <pre><code>&lt;img src="pics/empty.png" id="imageReplace"/&gt;
  </code></pre>
  
  <p>When I click the link shown in HTML1, the image changes where the HTML2 code is, but the "title" attribute is not retrieved and nothing pops up when the mouse is over the new pic. I want to retrieve this title attribute.</p>
  
  <p>Can anyone help?</p>