August 1999
Intermediate to advanced
1488 pages
72h 53m
English
location.href
The href property of the Location object represents the entire URL string for the current page displayed in the browser.
In the following fictitious Web address:
http://www.mcp.com:80/foo?something#foobar
the href value would be the entire URL address.
An example of how to get the href value is shown in Listing 7.383.
<html>
<head>
<title> Using the href property of the Location object</title>
</head>
<body>
<script language="JavaScript">
<!-- Hide
function show(){
document.location.href ="http://www.mcp.com:80/foo?something#foobar";
}
// End Hide ---> </script> <form name="form1"> ... |
Read now
Unlock full access