I am going through some (old?) native javascript and I encountered a separation of document.getElementById, document.all and document.layers.
From what I know, document.all and document.layers are obsolete now, but I just wanted to make sure.
Yes, they are obsolete.
The document.all
collection is specific to Internet Explorer. The document.layers
collection was specific to Netscape. Neither is in the standards.
Today we use document.getElementById
instead.
See also: https://developer.mozilla.org/en-US/docs/Mozilla_Web_Developer_FAQ#JavaScript_doesn.E2.80.99t_work.21_Why.3F
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With