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?
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.
Try this. It’s pure javascript, no jQuery involved. In fact jQuery is too heavy for such a job, really.
decodeURIComponent should be used to allow parameter value contain any character, for example the very crucial equals sign
=, an ampersand&or a question mark?.