getElementsByClassName & IE8: Object doesn't support this property or method [duplicate]
问题 This question already has answers here : javascript document.getElementsByClassName compatibility with IE (7 answers) Closed 5 years ago . I know " getElementsByClassName " is not support by IE8 . Do you know what can I use instead? I am getting annoying by error "Object doesn't support this property or method". The HTML code is: function sumar() { var elems = document.getElementsByClassName('verdana14 toAdd'); var myLength = elems.length; total = 0; for (var i = 0; i < myLength; ++i) { if