title: Jquery replace input button onclick event
body: <p>I have HTML loaded with the Jquery .load method and need to dynamically change anchor HREF and input button ONCLICK targets in this HTML on the client as the page loads, (I don't have the option to change the server generated HTML).</p>
  
  <p>The .load works fine and I can change the HREF target OK but I can't find a way of changing the ONCLICK target?</p>
  
  <h2>HTML</h2>
  
  <ol>
  <li><p>Anchor HREF</p>
  
  <pre><code>&lt;div style="width:143px;" id="LM_OBJV"&gt;
  &lt;span title="View Objectives Detail" class="PSHYPERLINK"&gt;
  &lt;a class="PSHYPERLINK" href="javascript:Action_win0
  (document.win0,'LM_OBJV','Relationship Building',false,true);" tabindex="54"
  id="LM_OBJV" name="LM_OBJV"&gt;Relationship Building&lt;/a&gt;
  &lt;/span&gt;
  &lt;/div&gt;
  </code></pre></li>
  <li><p>Button ONCLICK</p>
  
  <pre><code>&lt;div id="win0divLM"&gt;
  &lt;a id="Left" style="background-Color: transparent;border:0;" class="PBUTTON"&gt;
  &lt;span style="background-Color: transparent;"&gt;
  &lt;input type="button" onclick="Action_win0(document.win0,'LM_PB', 0, 0, 'Add New',
    false, true);" style="width:120px; " class="PBUTTON" value="Add New" tabindex="77" 
  id="LM_PB" name="LM_PB"&gt;
  &lt;/span&gt;
  &lt;/a&gt;
  &lt;/div&gt;
  </code></pre></li>
  </ol>
  
  <h2>Javascript</h2>
  
  <pre><code>$('#result').load('some.php', function() {
  
      $("a.PSHYPERLINK")
      .each(function()
      { 
          this.href = this.href.replace("Action_win0", "Action_winx");
  
      });
  
  });
  </code></pre>
  
  <p>So this JS works fine, loads the HTML into the #results DIV and changes the HREF's from "Action_win0" to "Action_winx". </p>
  
  <p>But how can I also change the input type="button ONCLICK events from "Action_win0" to "Action_winx"? I've tried several Jquery selectors but just can't get it to work :( </p>