There are two ways to reference the body tag:
The first one: Use DOM Core to reference the first (and only) body tag of a given document
document.getElementsByTagName("body")[0]
Second Type: Use HTML-DOM, that is, refer to the body attribute of a given document:
doucumnet.body
The focus of this article:
1. Which is DOM Core and which is HTML-DOM (slowly added)
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