|
Q1341 How can I determine the height and width of the window or frame?
irt.org | Knowledge Base | JavaScript | Window | Q1341 [ previous next ]
Q1341 How can I determine the height and width of the window or frame?
Try:
<body>
<script language="JavaScript"><!--
var width = 640, height = 480; // defaults
if (document.layers) {
width = window.innerWidth;
height = window.innerHeight;
}
else if (document.all) {
width = document.body.clientWidth;
height = document.body.clientHeight;
}
//--></script>
....
</body>
|
Feedback on 'Q1341 How can I determine the height and width of the window or frame?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.