Home > Web Front-end > JS Tutorial > 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
Release: 2016-05-16 19:16:48
Original
1140 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template