title: javascript change input value by link title
body: <p>I'm new to JavaScript and I need some help with a simple problem I'm having:</p>
  
  <p>I have one empty input field, and two links (<code>anchors</code>) with differing values for the <code>title</code> attribute.</p>
  
  <p>I'd like to write a small piece of JavaScript that changes the value of the <code>input</code> element to the title of whichever link the user clicks.</p>
  
  <p>For example:</p>
  
  <p>First link = <code>Prague</code><br/>
  Second link = <code>Budapest</code></p>
  
  <p>When I click "Budapest" I'd like the value of the <code>input</code> element to change to "Budapest"</p>
  
  <p>If needed I can supply a basic <code>jsFiddle</code> but hopefully I've made myself clear enough.</p>