Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何获得像 jquery 中的元素?我正在寻找 javascript 代码。
例如:$(#id)
提前致谢
一个纯 JavaScript 的答案是:
document.getElementById('id');