Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get site url javascript

document.URL
> "http://example.com/page1.html"

document.location.href
> "http://example.com/page1.html"

document.location.pathname
> "/page1.html"

document.location.origin
> "http://example.com"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #site #url #javascript
ADD COMMENT
Topic
Name
4+4 =