How to get current Page URL using JavaScript

Publicado em: 29 Janeiro 2017
no canal de: Dhruvin Shah
4,719
23

Today we will discuss
how to get current Page URL using JavaScript

To get a current URL
window.location is used in javascript.
If I write window.location in a console
it will return below values.
hash
host
hostname
href
origin
pathname
port
protocol

If my requirement is to get full URL
Then I will write
window.location.href

If my requirement is to get only current page
then I have to write
window.location.pathname

If you have any doubt related this video
Mail me: dhruvinshah16@gmail.com
Facebook:   / learn2all  
Whatsapp: https://goo.gl/forms/nLq3STEmfFzMqTHT2


Nesta página do site você pode assistir ao vídeo on-line How to get current Page URL using JavaScript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Dhruvin Shah 29 Janeiro 2017, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 4,719 vezes e gostou 23 espectadores. Boa visualização!