Javascript examples for DOM:Document baseURI
The baseURI property returns the base URI of the HTML document.
This property is read-only.
A String, representing the URI of the node's page
The following code shows how to get the baseURI of the document:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w. j a v a 2 s . c o m*/ var x = document.baseURI; document.getElementById("demo").innerHTML = x; } </script> </body> </html>