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

name property (namespace)

Browser support:
Returns the local name of a namespace.

Syntax:

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

Possible values:

String that represents the local name of the namespace.
Default: this property has no default value.

Example HTML code 1:

This example illustartes the use of the name property:
Code
hover.htc
<html xmlns:myNS="http://help.dottoro.com/NS">
<head>
    <script type="text/javascript">
        var namespace = document.namespaces("myNS");
        namespace.doImport("hover.htc");

        function GetNSInfo () {
            var namespace = document.namespaces["myNS"];
            alert ("The name of the namespace is " + namespace.name);
            alert ("The URN of the namespace is " + namespace.urn);
        }
    </script>
</head>
<body>
    <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>
</body>
</html>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content