【发布时间】:2018-09-21 04:43:30
【问题描述】:
如何检查 dom 中是否存在类名并在纯 JavaScript 中创建和 if 语句?
if(Check if a class name exists in the dom) {
document.getElementById('btnNxt').setAttribute('disabled', true);
}
【问题讨论】:
-
if(document.querySelector(".className"))
标签: javascript