tagName
Property of dom/HTMLElementdom/HTMLElement
Syntax
var result = element.tagName;
element.tagName = value;
Examples
This example retrieves the tag name of an object that has the identifier specified in the prompt window.
<SCRIPT>
var idValue = window.prompt("Get the tag with this ID:");
if (idValue != null) {
alert(document.all[idValue].tagName)
}
</SCRIPT>
Syntax
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]