HTML DOM href Property
Definition and Usage
The href property sets or returns the entire URL.
Syntax
Example
Assume that the current URL is: http://example.com/test.htm#part2:
<html>
<body>
<script type="text/javascript">
document.write(location.href);
</script>
</body>
</html>
|
Output:
http://example.com/test.htm#part2
|
Try-It-Yourself Demos
Use the href
property of the location object
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|