javascript need not be written in the entry function
used to be written in window.onload = function () {}, but today I suddenly found that I forgot to write the entry function at the beginning (the constructor is written in front of the html that needs to be operated), and the constructor can also be executed.
is this the case? no relevant