Get URL Parameters Using JavaScript
This is really great! I ran across an article on netlobo.com that provides a short JavaScript function that allows one to access query string parameters the way you can in server-side programming.
“Most of the server-side programming languages that I know of like PHP, ASP, or JSP give you easy access to parameters in the query string of a URL. JavaScript does not give you easy access. With JavaScript you must write your own function to parse the window.location.href value to get the query string parameters you want. Here is a small function I wrote that will parse the window.location.href value and return the value for the parameter you specify. It does this using JavaScript’s built in regular expressions.”
2 Comments:
I inclination not concur on it. I think nice post. Expressly the title attracted me to study the sound story.
Genial post and this enter helped me alot in my college assignement. Thanks you for your information.
Posta un commento
<< Home