Home  >  Article  >  Web Front-end  >  How to solve the problem that firefox does not support document.all_Basic knowledge

How to solve the problem that firefox does not support document.all_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 19:16:481098browse

Today I wrote the v2 version of Kinoko-World and encountered a small problem with js. document.all is not supported in Firefox. I searched online and found that
use document.getElementsByTagName("*") instead and it will be OK.
getElementsByTagName("*") can get a collection of all elements
getElemntById can get an element by id
getElementsByName can get an element by name attribute

getElementById works better Ah

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn