title: Can't change onclick dynamically through javascript: bookmarklet
body: <p>I've tried to change the onclick function through a bookmarklet in the url using this code:</p>
  
  <pre><code>javascript: document.getElementById('Button1').onclick = function(){alert('foo')};void(0);
  </code></pre>
  
  <p>I can change the value of the button but just not the onclick function. Is it even possible?
  Thanks ^^</p>
  
  <p>Some notes: I've also tried putting the code in a .js file and creating an external .js file using createElementId but it still does not seem to work :/</p>