DOM API - The "window" Object
This section provides a quick description of the 'window' object of the DOM API. A tutorial example is provided on changing browser window size through the 'window' object.
The DOM API provided by IE browser contains another useful object called "window",
which has the following features:
- The "window" object is a browser built-in object that represents the browser window that contains the current HTML document.
- The "window" object offers a number of properties and methods to allow you
- The "document" object and its "node" objects offers various methods to allow you to manipulate the window.
To illustrate some nice features of the "document" object, I wrote this VBScript tutorial example:
- Copyright (c) 2015, HerongYang.com, All Rights Reserved.
sizeID = 0
if sizeID = 0 then
elseif sizeID = 1 then
elseif sizeID = 2 then
elseif sizeID = 3 then
sizeID = (sizeID+1) mod 4
<input type="button" value="Change" onClick="changeSize()"/>
Run this VBScript example in a Web browser, and click the "Change" button.
The browser window will change its size each time you click the button.
For more tutorial examples on the "window" object, see the DOM API chapters in this book.
Table of Contents
About This Book
Introduction of VBScript - Visual Basic Scripting Edition
Variant Data Type, Subtypes, and Literals
Numeric Comparison Operations and Logical Operations
String Operations - Concatenation and Comparison
Variable Declaration and Assignment Statement
Expression and Order of Operation Precedence
Statement Syntax and Statement Types
Array Data Type and Related Statements
Array References and Array Assignment Statements
Conditional Statements - "If ... Then" and "Select Case"
Loop Statements - "For", "While", and "Do"
"Function" and "Sub" Procedures
Inspecting Variables Received in Procedures
Error Handling Flag and the "Err" Object
Regular Expression Pattern Match and Replacement
scrrun.dll - Scripting Runtime DLL Library
Creating Your Own Classes
►IE Web Browser Supporting VBScript
VBScript Support in IE Web Browsers
Including VBScript Code with HTML "script" Tags
Including VBScript Code as External Files
DOM API - The "document" Object
►DOM API - The "window" Object
Event Listeners and Objects
'vbscript:' Pseudo-URL Addresses
IIS ASP Server Supporting VBScript
WSH (Windows Script Host)
Full Version in PDF/EPUB