📜  js 选择 div - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:18.838000             🧑  作者: Mango

代码示例1
// Select div with class "theDiv"
document.queryselector('.theDiv');
// Select div with ID "theDiv"
document.queryselector('#theDiv');