javascript - Getting values from location -
I need to get a search query from the search query address of the page address.
Is the safest cross-browser and the most effective way to get the string. For example:
q = 123 & amp; Data = true & amp; B = 456 // to http://www.example.com/?q=123&data=true&b=456
and location.search
all modern Available on browsers (IE7 +, FF, WebKit, Opera)?
Yes, location.search
is a way.
Presented in JS 1.0, supported by IE 3.0, Netscape 2, Opera 5.12, FF 1.0, Konqueror 3.1 and Safari 1.0.
And I think it is always supported in Chrome because other browsers support this era.
Comments
Post a Comment