

Como capturar url do site com javascript
source link: https://dev.to/pwcodigo/como-capturar-url-do-site-com-javascript-4a78
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.


Posted on Nov 4
Como capturar url do site com javascript
Para capturar a url do seu site com javascript basta digitar o seguindo script.
let captureUrl = window.location.href;
console.log(captureUrl);
Criei uma variável letcaptureUrl, nela vai ficar armazenado a informação da url da minha aplicação.
Na segunda linha, estou exibindo as informações que está no captureUrl pelo console.log e você pode também trocar por alert(captureUrl).
Link da documentação -> clique aqui
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK