Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The Element ID is not obtained through the use of document.getElementsByClassName, as this method returns an array-like object of all elements with the specified class name. To obtain the Element ID, you need to access each individual element in the array and use the id property to get the desired ID value.