August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.links[num].pathname
The pathname property contains the path of the file specified in the URL, including the leading slash (/). This property is a read/write string.
In Listing 7.16, a sports car picture site is created. The user is instructed to click the type of sports car he or she would like to see. Based on the car selected, the pathname property is modified to direct the link to a different HTML file.
<html> <body> <center><h1><u>Sports Car Pictures</u></h1></center> <h3>Step 1: Choose a car.</h3> <form name="question"> <input name="carType" type="radio" checked onClick="updateLinks('LAMBORGINI')">Lamborgini<br> ... |
Read now
Unlock full access