During the writing process, when it comes to code processing, because I initially placed the javascript code in the head tag, the document.body object was empty!
We all know that when javascript is executed, the page will be temporarily loaded to execute the html code, so when the js code is placed in the head tag, the html page has not yet been executed to the body, so an error occurs!
Later, the js code was placed at the end of the body, so that the body object can be correctly referenced!
At the same time, in large website architecture, it is also a way to improve page loading speed! Loading the html tag content on the home page of the page, and executing the js code at the end of the page, can greatly improve the page opening speed and improve the user experience! < ?xml version="1.0" encoding="utf-8"?>
76
;76
76
;/grade>
Northwestern University 7th School
/grade>
Northwestern 8 University
;
Northwestern 9 University
🎜>
Northwestern University
76
student>
🎜> ;student name="gaoxing">
Northwestern University
76