Possible Duplicate:
Get query string values in JavaScript
I am writing a jQuery function that saves an item remotely with Ajax. I’d like to be able to grab the edit.php?id=###&field=### info from the url right in my function. How would I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t need jQuery for this task, you can do it simply with javascript :
Then if you retrieve this url : http://www.yoursite.com/Index.php?g=12¶m=43
to retrieve the ‘param’ parameter, all you need to do is this :
or the ‘g’ parameter like this :
or switch ‘param’ with the name of the parameter you need.