JavaScript Demo
JavaScript / HTML/ CSS Code
Output
Index of element "2"
Index of element "2"