Simple JavaScript: window.location
Basic stuff, but mighty useful for a novice such as myself. window.location is an object containing:
Properties
hash
host
hostname
href
pathname (relative to the host)
port
protocol
search
Methods
assign(url)
reload(forceget)
replace(url)
toString()
Example:
<SCRIPT LANGUAGE="JavaScript">
<!--
{
document.write(location.href);
document.write(location.hostname);
}
// -->
</SCRIPT>
0 Comments:
Posta un commento
<< Home