Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if localhost javascript

if (location.hostname === "localhost" || location.hostname === "127.0.0.1")
    alert("It's a local server!");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #localhost #javascript
ADD COMMENT
Topic
Name
9+6 =