When I browse, let's say, to example.com/page/name?source=illia
I get to example.com/password
page. This is an application set up.
In the dev tools, on the Network tab, I can see "resources" (not sure if I name it correctly) in the Name
column.
So there are /name?source=illia
and /password
and all other items.
The question is how can I access /name?source=illia
with js. Based on that I'd like to change the workflow.
document.referrer
is an empty string
Here is the screenshot from the devtools. Is it possible to get diagnostic?source=illia@example.com with javascript?
Here you can call javascript to get whole url:
window.location.href
Then you can extract what you need. One easy way is to split:
var url = window.location.href;
alert(url.split('?')[1]);
Hope to be useful;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.