The IE browser does not support the getElementsByClassName solution


Some online directly define a getElementsByClassName function, but it requires all use the code document. The getElementsByClassName getElementsByClassName spoke. It’s more or less inconvenient and not universal.