The Window Object
Javascript the Definitive Guide by David Flanagan

CpSc 217 - Structured and Dynamic Web Programming

The notes found on these pages all reference the textbook given above. Unless otherwise stated, the citation of the information on these web pages is that text.


Timing


The browser consists of many objects. Some of these objects are discussed here.

The DOM can be easily examined using this page created by Dr. Dailey.


Location Property

window.location.href
permits browser to "change" to that page

URL

History Property

1. window.history.back
2. window.history.forward
3. window.history.go
Enter a positive or negative number to go forward or back

value

navigator Property


Text Dialogs

1. alert('hello world');
2. N=prompt('enter your name)'
3. confirm('you entered ' + a.value)

IDs of elements


Opening and closing browser windows


HTML elements