How to get current Page URL using JavaScript

Publicado el: 29 enero 2017
en el 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


En esta página del sitio puede ver el video en línea How to get current Page URL using JavaScript de Duración hora minuto segunda en buena calidad , que subió el usuario Dhruvin Shah 29 enero 2017, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 4,719 veces y le gustó 23 a los espectadores. Disfruta viendo!