Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body id="body" style="margin:0;">
- <p id="p1" style="margin:0;"></p>
- <script>
- var XBody = document.getElementById("body")
- var HBody = XBody.clientHeight
- var WBody = XBody.clientWidth
- document.getElementById("p1").innerHTML = WBody + " x " + HBody
- console.log(WBody + " x " + HBody)
- console.log(HBody / WBody)
- if (HBody / WBody > 1)
- {console.log("Portrait")}
- else
- {console.log("Normal")}
- </script>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement