Created
March 28, 2022 07:18
-
-
Save teer823/df98f4047d3d0eff5940e42fcc8ae017 to your computer and use it in GitHub Desktop.
Simple HTML with Vanilla Javascript show hostname
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<span> Hostname : </span><span id="hostname">Hostname</span> | |
</body> | |
<script> | |
item = document.getElementById('hostname'); | |
item.innerText = window.location.hostname | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment