Subversion Repositories cheapmusic

Rev

Blame | Last modification | View Log | RSS feed

<!DOCTYPE html>
<html>
<head>
<title>Inner Window Size</title>
</head>
<body>
<h1>Inner Window Size</h1>
<p>Width: <span id="width"></span></p>
<p>Height: <span id="height"></span></p>
<script>
document.addEventListener("DOMContentLoaded", function() {
    document.getElementById("width").innerHTML = window.innerWidth;
    document.getElementById("height").innerHTML = window.innerHeight;
    window.addEventListener("resize", function (event) {
        document.getElementById("width").innerHTML = window.innerWidth;
        document.getElementById("height").innerHTML = window.innerHeight;
    });
});
</script>
</body>
</html>