通过getElementsByClassName方法获取到集合,其中也有数据,但是用索引取出其中的标签就取不出来,怎么获取到input标签?
document.querySelector(".bui-switch-input")
直接写 document.getElementByClassName('bui-switch-input')[0]