私はいくつかの (古い?) ネイティブ JavaScript を使用していますが、document.getElementById、document.all、および document.layers の分離に遭遇しました。
私の知る限り、document.all と document.layers は廃止されましたが、確認したかっただけです。
私はいくつかの (古い?) ネイティブ JavaScript を使用していますが、document.getElementById、document.all、および document.layers の分離に遭遇しました。
私の知る限り、document.all と document.layers は廃止されましたが、確認したかっただけです。
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.
Yes, they are. They comes from a period where Internet Explorer 4 and Netscape 4.x were the main browsers: document.layers was used by Netscape, and document.all from IE. The first is definitely unused anymore, where I guess document.all is still used for legacy in IEs.