title: How to dynamically change a parameter of a javascript call from the href attribute of an element
body: <p>Is there a way to dynamically change what parameters are passed to a javascript function from an html element? For instance, say I have the following:</p>
  
  <pre><code>&lt;a id="myElement" href="javascript:myFunction('myParam');"&gt;Click me!&lt;/a&gt;
  </code></pre>
  
  <p>How can I change 'myParam' to another parameter, say 'myParam2'? An answer using either javascript or jquery is fine with me. For simplicity's sake, feel free to suppose I can find this element by document.getElementById('myElement') or some other means.</p>