BOM Browser Object Model Width and Height tutorial in JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Window Height Width JavaScript</title>
<link rel="stylesheet" href="">
</head>
<body onresize="resizeFunction()">
<script>
function resizeFunction() {
console.clear();
var iHeight = window.innerHeight;
console.log("Inner Height : " + iHeight);
var oHeight = window.outerHeight;
console.log("Outer Height : " + oHeight);
var iWidth = window.innerWidth;
console.log("Inner Width : " + iWidth);
var oWidth = window.outerWidth;
console.log("Outer Width : " + oWidth);
}
</script>
</body>
.png)
.png)
.png)
.png)
.png)
Comments
Post a Comment