December 2001
Intermediate to advanced
480 pages
9h 22m
English
Using links in HTML is second nature to web developers, and creating links with JavaScript is both easy and much more powerful than what can be done with the <a href="myURL"> tag in HTML. The main linking objects in JavaScript are location and history. When the location object is assigned a URL, you get the same results as linking a page. It has the following format:
window.location="http//:www.yourURL.something"; (This states that the window object is optional, and it typically is not used with location. It is included simply to remind the reader that location is a property of window.)
The location object has eight properties and two methods, as shown in Table 10.1.
Read now
Unlock full access