How can I get the index value of getElementsByClassName collection.
function clickSchedule(){
var t = document.getElementsByClassName("table")
for(i=0; i<=t.length; i++)
{
t[i].onclick= function() {
// get the index value of the node when clicked something like this
// alert(t[i].index)
// already tried alert(t[i]) returning undefined.
// already tried alert(t.item(i)) returning NULL.
};
}
}
window.onload = function(){
clickSchedule();
};