Is it possible to get data from an url with jquery
for example if you have www.test.com/index.html?id=1&name=boo
how to get id and name?
Here i have done complete solution for above issue. please check demo link as shown below:
For that, you have first include latest jquery.js and querystring-0.9.0.js scripting files in header tag.
Demo: http://codebins.com/bin/4ldqpac
HTML
abc
JQuery
$(function() {
$("a").click(function() {
setTimeout(function() {
var param1 = $.QueryString("param1");
var param2 = $.QueryString("param2");
alert(param1);
alert(param2);
}, 300);
});
});
Demo: http://codebins.com/bin/4ldqpac