scopeName property
Gets the namespace defined for the element.
This property is not supported for Windows Store apps using JavaScript.
Syntax
| JavaScript | |
|---|
Property values
Type: String
A String that specifies one of the following values.
-
Default. All standard HTML tags.
-
Namespace prefix that is used with the custom tags. This namespace is declared in the document by using the XMLNS attribute of the html element.
Remarks
To declare the namespace in the document, use the xmlns attribute of the html element.
Download the HTC for the sample below: simple.htc
Examples
This example shows the values that are returned by the scopeName and tagUrn properties when they are used with a simple HelloWorld custom tag. The browser's status bar displays the property values.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/tagUrn.htm
<html xmlns:InetSDK='http://msdn.microsoft.com/workshop'> <style> @media all { InetSDK\:HelloWorld { behavior:url(simple.htc) } } </style> <script type="text/javascript"> function window.onload() { window.status = 'scopeName = ' + hello.scopeName + '; tagUrn = ' + hello.tagUrn; } </script> <body> <InetSDK:HelloWorld ID='hello'></InetSDK:HelloWorld> </body> </html>
An alternative call to the HTC can also be made as an attribute:
<html XMLNS:InetSDK='http://msdn.microsoft.com/workshop'> <script> function window.onload() { window.status = 'scopeName = ' + hello.scopeName + '; tagUrn = ' + hello.tagUrn; } </script> <body> <InetSDK:HelloWorld ID='hello' style="behavior:url(simple.htc)"></InetSDK:HelloWorld> </body> </html>
See also
- a
- abbr
- acronym
- address
- applet
- area
- article
- aside
- b
- base
- baseFont
- bgSound
- big
- blockQuote
- body
- br
- button
- caption
- center
- cite
- code
- col
- colGroup
- comment
- custom
- dd
- del
- dfn
- dir
- div
- dl
- dt
- em
- embed
- fieldSet
- figcaption
- figure
- font
- footer
- form
- frame
- frameSet
- head
- header
- hgroup
- hn
- hr
- html
- i
- iframe
- img
- input type=button
- input type=checkbox
- input type=email
- input type=file
- input type=hidden
- input type=image
- input type=number
- input type=password
- input type=radio
- input type=range
- input type=reset
- input type=search
- input type=submit
- input type=tel
- input type=text
- input type=url
- ins
- isIndex
- kbd
- label
- legend
- li
- link
- listing
- map
- mark
- marquee
- menu
- nav
- nextID
- noBR
- noFrames
- noScript
- object
- ol
- option
- p
- plainText
- pre
- q
- rt
- ruby
- s
- samp
- script
- section
- select
- small
- span
- strike
- strong
- style
- sub
- sup
- table
- tBody
- td
- textArea
- tFoot
- th
- tHead
- title
- tr
- tt
- u
- ul
- var
- wbr
- xml
- xmp
- Using Custom Tags in Internet Explorer