title: extend onclick function
body: <p>I have a onclick function like this</p>
  
  <pre><code>onclick = function(){alert('hello')}
  </code></pre>
  
  <p>I want to add an additional function to it base on the server response so that I can display more, like not only display hello but also 'you are welcome', how to writ this without jquery?</p>
  
  <pre><code>onclick = function(){alert('you are welcome')}
  </code></pre>
  
  <p>thank you for helping.</p>