85776/how-to-retrieve-get-parameters-from-javascript
For js within page.html,how can it retrieve GET parameters?
For the below simple example,func('returnurl') should be /admin
http://domain.com/page.html?returnurl=%2Fadmin
But it should also work for complex querystrngs. How to do that?
Hello @kartik,
This code gives you GET without the question mark.
window.location.search.substr(1)
From your example it will return returnurl=%2Fadmin
Hope it helpss!!
Thank you!!
Hello @kartik, This is possible, but you'll have ...READ MORE
Hello @kartik, Use: var host = window.location.hostname; or possibly var host ...READ MORE
Hii, This works in all browsers: window.location.href = '...'; If ...READ MORE
Hello @kartik, You can get the list of Users ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Hey, The way by which PHP can assign ...READ MORE
Hello, niroj. Here is my idea session_start(); $_SESSION['USERNAME'] ...READ MORE
Hii @kartik, The $_REQUEST variable is used to read the ...READ MORE
Hello @kartik, You can first go through: window.location.search It will ...READ MORE
Hello @kartik, Use this: var filename = fullPath.replace(/^.*[\\\/]/, '') This ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.