GeeksForGeeksquerySelector() vs. getElementById() Learn the difference between two methods to select elements from the DOM in JavaScript: document.querySelector () and document.getElementById (). See syntax, 更多内容请查看https://www.geeksforgeeks.org/queryselector-vs-getelementbyid/