HTML DOM URL property
Definition and Usage
URL property returns the URL of the current document.
grammar
document.URL
Browser Support
All major browsers support URL attribute
Examples
Examples
Returns the full URL of the document:
<html>
<body>
文档的完整的URL:
<script>
document.write(document.URL);
</script>
</body>
</html>
<body>
文档的完整的URL:
<script>
document.write(document.URL);
</script>
</body>
</html>
try it"
Document Object