Possible Duplicate:
Get query string values in JavaScript
I have a URL like below
http://domain_name/?act=SiteVisit
I want to split this URL and want to take act value in one variable at the time of page load.
$('document').ready(function(){
var mail_link = window.location;
var arrURL = mail_link.split('=');
alert(arrURL[1]);
return false;
});
I used the above code but its not working.But if I print and assign the variable which i get in alert message its working
So tell me how to get the SiteVisit in a variable