<p id="urlText">
URL:<br />
<span id="url">URL goes here</span>
</p>Document: documentURI property / notebook
Document: documentURI property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
document.getElementById("url").textContent = document.documentURI;