Today, I looked at a foreign website and found that the head element is obtained as follows
The latter is our commonly used method, and the previous document.head is actually the first time we see it. After checking the information, I found that it turned out to be HTML5 stuff. It's really simple, just one attribute.
Of course, IE6/7/8 does not support it. IE9/Safari/Chrome/FF/Opera are all supported (latest version). Record it.
The HTMLDocument interface in html4 is as follows
The HTMLDocument interface in html5 is as follows
Related:
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268