View Full Version : query strings in javascript
cra992
06-02-2005, 06:18 PM
how do i retrieve parameters in html from a link such as: http://mysite.com/?param=1
does anyone know how to retrieve that information in javascript?
mark87
06-02-2005, 07:05 PM
You could try something like this -
function blah() {
linkquery=location.href.split("?");
query=linkquery[1]
}
Think that should work?
'query' is the text after the '?', so then you can do what you want with it...
cra992
06-02-2005, 07:33 PM
how would i display what is after the ?param=
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.