getElementsByTagName().length returns zero

前端 未结 3 443
臣服心动
臣服心动 2021-01-04 20:17

I am trying to do a simple thing such as:

var elements = document.getElementsByTagName(\"input\");
console.log(elements);
console.log(elements.length);
         


        
3条回答
提交回复
热议问题