asp.net.ph

Skip Navigation Links

tagName Property

Language References


Retrieves the name of the element type.

Syntax


HTML N/A
Script [ sName = ] object.tagName

Possible Values


sName String containing the object’s tag name.

The property is read-only with no default value.

Example

The following example retrieves the tagName for an object that has the identifier that was specified in the prompt window.

<script language="JavaScript">
var idVal = window.prompt ( 
  "Get the tag with this ID: " );
if ( idVal != null ) {
  alert ( document.all [ idVal ] .tagName )
}
</script>


>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note