Created
June 1, 2022 14:13
-
-
Save Lego2012/06ff8d97ce57b3a2c350fce6914f578a to your computer and use it in GitHub Desktop.
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
<body> | |
<h1></h1> | |
<script> | |
function showBrowserWidth() { | |
const width = window.innerWidth | |
document.querySelector('h1').innerText = `Width: ${width}` | |
} | |
window.onload=showBrowserWidth | |
window.onresize=showBrowserWidth | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment