80 Display Domain Name In Javascript New

Aslong as it works on domain s i can put the code into manually as above or similar can easily upload a php file to wordpress or any site for that matter where links are directed through this if they sport the domain name required.
Display domain name in javascript. Window location pathname returns the path and filename of the current page. Window location protocol returns the web protocol used http. Window location href returns the href url of the current page.
Use document location and get application hostname url and open file path to clear. Get the domain name of a website using javascript. A string representing the domain name of the server that loaded the current document or null if the domain of the document cannot be identified dom version core level 2 document object.
The window location object can be written without the window prefix.