The HTML was not loaded again for nearly one hours. My tears fell when I found the truth.
The location introduced by the JS code introduced by the <script> tag if the HTML element is not found in the code, the JS code cannot find the HTML element, because the JS code is executed before the HTML is loaded, and then it is the undefined of evil. Pity me again and again modify the wording of select () ...
There are two ways to solve this, the first one is to refer to your own JavaScript at the end of the HTML, and the second is to use $ (document). Ready (function () {}), the code in curly braces waits for the HTML element to be loaded before it is executed.
Once again, thank StackOverflow Dafa.
Words every time with a Youdao dictionary to the Chinese translation into English and then go to search really will make people feel very embarrassed ah ... Learn English well!
JavaScript notes 1