JavaScript has one object that holds all of the objects in the code. It also holds all of the events and other global elements of the web page. The object type for the global object is specified as Window.
<!DOCTYPE html> <html> <head> <title>XoaX.net's Javascript</title> </head> <body> <script type="text/javascript" src="GlobalObject.js"></script> </body> </html>
// This function just prints out the members of an object. function PrintAnObject(qObject) { var iCount = 0; var sOutput = typeof(qObject)+": " + qObject.constructor.name + "<br />"; for (var sProperty in qObject) { sOutput += " " + sProperty + ': ' + qObject[sProperty]+"<br />"; ++iCount; if (iCount >= 15) { document.writeln(sOutput); document.writeln(" ...<br />"); return; } } } // Print the members of the global object PrintAnObject(this);
© 20072025 XoaX.net LLC. All rights reserved.