Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - window.location built-in property

0 votes
68 views
added Mar 17 in Javascript by lcjr First Warrant Officer (8,030 points)
window.location.pathname // /cat/sub-cat

// For reference:

window.location.host     // www.example.com (including port if there's any)
window.location.hostname // www.example.com
window.location.hash     // #top
window.location.href     // http://www.example.com/cat/sub-cat?filter=a#top
window.location.port     // (empty string)
window.location.protocol // http:
window.location.search   // ?filter=a 

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...