How to get Window object from document object in Javascript
document.defaultView
document.defaultView
returns the Window
object.
Example
<!DOCTYPE HTML>
<html>
<body>
<script type="text/javascript">
document.writeln(window.outerWidth);
document.writeln(document.defaultView.outerHeight);
</script>
</body>
</html><!-- www .ja va2 s. c o m-->