Lets say I have 2 or more elements with the ID "total". I am passing the index of the one I want to a function. I thought I could say:
document.getElementById('total')[index].innerText = "Whatever";
by that doesn't work. Is there a way I can do this?
Thanks
![]()




Reply With Quote