Export (0) Print
Expand All
all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

tagUrn property

Sets or gets the Uniform Resource Name (URN) specified in the namespace declaration.

This property is not supported for Windows Store apps using JavaScript.

Syntax

JavaScript

p = object.tagUrn

Property values

Type: String

the URN in the namespace declaration, or the value in Possible Values.

null

Default. Returned for standard HTML tags, or for custom tags that omit the namespace declaration.

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 uses the values returned by the scopeName and tagUrn properties to create a simple HelloWorld custom tag.

The browser's status bar displays the property values.

Note  For IE8Standards mode to render correctly, make sure there is no spaces in your call to the HTC file.

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, as shown in the following code example.

Note  Make sure there are no spaces in your style's declaration.


<html xmlns:inetsdk="http://msdn.microsoft.com/workshop">

<script type="text/javascript">
   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

 

 

Show:
© 2014 Microsoft. All rights reserved.