Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get domain

> Site:
https://www.google.com/search?q=js+get+domain
> window.location.hostname
'www.google.com'
> window.location.hostname.replace("www.","")
'google.com'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #domain
ADD COMMENT
Topic
Name
8+4 =