answersLogoWhite

0


Best Answer

You can get the current url using the document.URL property, as in:

<html>

<body>

The full URL of this document is:

<script>

document.write(document.URL);

</script>

</body>

</html>

Source: http://www.w3schools.com/jsref/prop_doc_url.asp

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you return current url with simple HTML dom?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you change HTML attribute using HTML dom?

You can change HTML attributes easily. Using Dom that can be done using JavaScript.


What is the difference between an HTML page and a dhtml page?

DHTML combines HTML, JavaScript, the HTML DOM, and CSS.


How is DOM used in JavaScript?

DOM stands for document Object Model that is used to get, change, add or delete HTML elements.


What is dom javascript?

DOM is document object model: It defines the logical structure to access and manipulate the HTML document.


Which one of the DOM 2 HTML objects is supported in Opera 9?

expando


How do you get HTML DOM nodes from a separate web page?

you can fetch the content of DOM nodes via AJAX calls - google "jquery ajax" for that


What are the object in dom?

Introduction. The Document Object Model (DOM) is a programming API for HTML and XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated.


What is a DOM inspector?

A DOM Inspector is a toll include in the Mozilla Firefox browser prior to Version 3. The main purpose of the DOM Inspector is to inspect the Document Object Model (DOM) tree of HTML and XML-based documents. :)


What is the full form of HTML dom?

Hypertext Markup Language, Document Object Model


What are the strengths of javascript to HTML?

HTML is a markup language which allows you to define and place elements on a page, or Document Object Model (DOM). Of course, HTML is static. That means that when a web designer uses a certain HTML attribute to make a word bold, for example, there is no way with HTML alone to change that setting. One part of JavaScript allows a programmer to add/remove or modify the DOM elements on the fly using scripts and stylesheets known as CSS. The combination of HTML, JavaScript and CSS is collectively known as DHTML (Dynamic HTML). Note that Javascript is a fully developed object based scripting language and can do many other things aside from DOM manipulation.


Difference between HTML and xHTML 1.0?

HTML uses SGML-like syntax. XHTML 1.0 uses XML syntax. HTML uses HTML DOM, XHTML uses XML DOM. There are small differences between those. Other than that, they're identical. They use same tags, attributes, have same semantics. XHTML 1.0 specification is very short and refers to HTML 4 specification for all important matters.


What is ready function in jQuery?

jQuery has a $(document).ready() function which is invoked after the DOM is loaded and before the page contents are loaded. It means you don't have to have body onload events and can completely remove all Javascript from your HTML by attaching events to elements independent of the HTML after the DOM has loaded.