I get a longString from object’s onclick value
var longString = String(this.onclick);
output like below;
function onclick(event) { window.location.href = “index.html?q1=v1&g2=v2”; }
I want parse that like below:
index.html?q1=v1&g2=v2
How can I do this with pure js or jquery which works with all browser?
Here’s one way to do it if you don’t like regular expressions.
Try it out: http://jsfiddle.net/Tk8aw/