You are here: Reference > JavaScript > client-side > HTML DOM > properties > urn (namespace)

urn property (namespace)

Browser support:
Returns the Uniform Resource Name (URN) of a namespace.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

String that represents the Uniform Resource Name (URN) of the namespace.
Default: this property has no default value.

Example HTML code 1:

This example illustartes the use of the urn property:
<html xmlns:myNS="">
    <script type="text/javascript">
        var namespace = document.namespaces("myNS");

        function GetNSInfo () {
            var namespace = document.namespaces["myNS"];
            alert ("The name of the namespace is " +;
            alert ("The URN of the namespace is " + namespace.urn);
    <myNS:span>Move the mouse over this text (element with behavior)</myNS:span><br />
    <span>Move the mouse over this text (element without behavior)</span>
    <br /><br />
    <button onclick="GetNSInfo ()">Get information about a namespace</button>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content