The following is the code for the test:
Test js execution order< ;/title>
The execution order after running is as follows:
The execution order is: js in the head, js in the page (this is also the case if this Js is placed outside the body tag order), js in the onload event of the body tag.