Skip to content

Instantly share code, notes, and snippets.

Created Mar 28, 2022
What would you like to do?
Simple HTML with Vanilla Javascript show hostname
<span> Hostname : </span><span id="hostname">Hostname</span>
item = document.getElementById('hostname');
item.innerText = window.location.hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment