August 1999
Intermediate to advanced
1488 pages
72h 53m
English
link.href
The href property of the Link object represents the whole URL for the link.
Listing 7.363 shows how to use the href property. When the button is clicked, the showhref() function displays the value of the href property of the link.
<html>
<head>
<title> Using the href property of the Link object</title>
</head>
<body>
<script language="JavaScript">
<!-- Hide
// displays the value of the href property in the text box.
function showhref(){
document.form1.text1.value = document.links[0].href;
}
// End Hide --->
</script>
Click the button to see the href property for the URL <form name="form1"> ... |
Read now
Unlock full access