6

Como capturar url do site com javascript

 3 years ago
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.
neoserver,ios ssh client
Cover image for Como capturar url do site com javascript
pwcodigo

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);
Enter fullscreen modeExit fullscreen mode

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK