Skip to content

Instantly share code, notes, and snippets.

@anova
Created October 12, 2015 18:47
Show Gist options
  • Save anova/50af83835a21169f63b9 to your computer and use it in GitHub Desktop.
Save anova/50af83835a21169f63b9 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<title>Screen resolution</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<style>
html,body{ height: 100%; }
</style>
<script>
function writeScreenResolution(){
document.write(
document.body.offsetWidth.toString()
+ 'x'
+ document.body.offsetHeight.toString());
}
</script>
</head>
<body onload="writeScreenResolution();">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment