August 1999
Intermediate to advanced
1488 pages
72h 53m
English
link.pathname
The pathname property of the Link object represents the pathname portion of the link URL.
Listing 7.373 shows how the pathname property is used. When the button is clicked, the showpathname function is executed. This displays the pathname for the link.
<html>
<head>
<title> Using the pathname property of the Link object</title>
</head>
<body>
<script language="JavaScript">
<!--Hide
// displays the pathname for the specified URL
function showpathname(){
document.form1.text1.value = document.links[0].pathname;
}
// End Hide --->
</script>
Click the button to see the pathname for the ... |
Read now
Unlock full access