tagName property
[This documentation is preliminary and is subject to change.]
Retrieves the tag name of the object.
Syntax
| JavaScript | |
|---|
Property values
Type: String
the tag name.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
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>
Build date: 3/8/2012