urn property (a)
Specifies or returns a Uniform Resource Name (URN) for a linked object.
The URN provides the identity, while the URL specifies an address to find it.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: urn |
Possible values:
String that sets or retrieves a Uniform Resource Name.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the URN attribute:
|
||||
<a href="http://www.dottoro.com" urn="myAnchor"></a> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the URN property:
|
||||
<head> <script type="text/javascript"> function GetUrn () { var anchor = document.getElementById ("myAnchor"); if ('urn' in anchor) { alert (anchor.urn); } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <a id="myAnchor" href="http://www.dottoro.com" urn="anchor">a sample link element</a> <br /> <button onclick="GetUrn ();">Get the value of the anchor's URN property!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
External links:
User Contributed Comments