title: Parse onclick="setLocation(...)" with jQuery / prototype
body: <p>I have this tag in example:</p>
  
  <p><code>&lt;button onclick="setLocation('http://mysite.com/checkout/cart/add/product/17/')" /&gt;</code></p>
  
  <p>What I need to do is initiate ajax request on button click. I need URL segment "product/17" from above appended to my ajax url. Any clever ways to extract this without using regex? HTML is not changable - <strong>however</strong> I can modify the URL, and in that case I would need to extract the exact URL from onclick attribute.</p>
  
  <p>So I either need URL or "product/17" extracted from onclick attribute, hopefully without using regex.</p>
  
  <p>Thanks</p>