HTML DOM baseURI Property
The DOM baseURI property gives you the main web address (URI) of a document. It's used only for reading and provides a string with the basic web address of the page.
Syntax:
node.baseURI
Return Value: It gives you a text that shows the web address of the node's page.
Example:In this instance, we'll work with the DOM baseURI property.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
h1 {
color: green;
}
</style>
</head>
<body>
<h1>Propertutorials</h1>
<h2>DOM baseURI Property</h2>
<button onclick="myfunc()">Submit</button>
<p id="gfg"></p>
<script>
// function myfunc() {
// let x = document.baseURI;
// document.getElementById("gfg").innerHTML =
// "The base URI of the page: " + x;
</script>
</body>
</html>