scopeName property
Retrieves the local name of the namespace declared for the current element.
Namespaces can be defined by the xmlns attribute in HTML documents.
For standard HTML elements the scopeName property returns 'HTML'.
Use the tagUrn property to get the Uniform Resource Name (URN) of a namespace declared for the current element.
Use the tagUrn property to get the Uniform Resource Name (URN) of a namespace declared for the current element.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read-only.
Possible values:
String that retrieves the namespace prefix.
One of the following values:
The element is a standard HTML tag. | |||||||
The prefix of the namespace declared for the current element. |
Default: HTML.
Example HTML code 1:
This example illustrates the use of the scopeName property:
|
|||||
<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 myTag = document.getElementById ("myTag"); alert ("The local name of the namespace is " + myTag.scopeName); alert ("The URN of the namespace is " + myTag.tagUrn); } </script> </head> <body> <myNS:span id="myTag">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 /> Click on the following button to get information about the namespace declared for the 'element with behavior'. <br /> <button onclick="GetNSInfo ()">Get information about the namespace</button> </body> |
|||||
|
|||||
Did you find this example helpful?
|
Supported by objects:
CommentNode
HTML elements:
a, abbr, acronym, address, applet, area, b, base, basefont, bdo, bgsound, big, blockquote, body, br, button, caption, center, cite, code, col, colgroup, comment, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, frame, frameset, h1, h2, h3, h4, h5, h6, head, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:hidden, input:image, input:password, input:radio, input:reset, input:submit, input:text, ins, isindex, kbd, label, legend, li, link, listing, map, marquee, menu, meta, nobr, noframes, noscript, object, ol, optgroup, option, p, param, plaintext, pre, q, rt, ruby, s, samp, script, select, small, span, strike, strong, style, sub, sup, table, tbody, td, textarea, tfoot, th, thead, title, tr, tt, u, ul, var, wbr, xml, xmp
Related pages:
External links:
User Contributed Comments