Following are various properties available to get Browser window width and height:
- window.innerHeight/window.innerWidth
- window.outerheight/window.outerwidth
- document.body.clientHeight/document.body.clientWidth
- document.documentElement.clientHeight/document.documentElement.clientWidth
Now if you want to calculate the window width and height you'll have to write javascript that checks the browser type and gets the width and height.
Fortunately for us Mark has already written a script that works in any browser. Here it is... http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
Thank you Mark!
No comments:
Post a Comment