Return to Kroll Design home page

JavaScript Tutorials

 
« Return

window properties

Below are some examples of properties of the window object.

Output:

Code:

<script type="text/javascript">
//<![CDATA[
document.write("window.closed : ", window.closed, "<br><br>"); window.defaultStatus = "Welcome!"; document.write("window.defaultStatus : ", window.defaultStatus, "<br><br>"); window.status = "This site continues to grow as we add new content."; document.write("window.status : ", window.status, "<br><br>"); document.write("window.document : ", window.document, "<br><br>"); document.write("window.history : ", window.history, "<br><br>"); document.write("window.location : ", window.location, "<br><br>"); window.name = "mainWindow"; document.write("window.name : ", window.name, "<br><br>"); document.write("<b>Navigator Object:</b><br>"); for (x in navigator) document.write(x + " = " + navigator[x] + "<br>"); document.write("<br><b>Screen Object:</b><br>"); for (y in screen) document.write(y + " = " + screen[x] + "<br>"); document.write("screen.width : ", screen.width, "<br><br>"); //]]> </script>


 
« Return


©2012 Kroll Design    info@KrollDesign.net    781.910.3694
Last modified: 12/31/1969 7:00 PM