如:let b = 5//here the variable b, that was 5 will become the same as the variable a这是非常基本的JavaScript,我知道。但是知道了这一点,我不明白为什么HTMLcollection会有所不同。document.getElementsByTagName('li'); xis.classList.toggle('
我有一些Javascript代码从HTMLCollection中删除项目,如下所示。当剪接被称为:allInputs.splice is not a function时,我得到了一个错误。如果元素类型不是按钮类型,我需要从HTMLCollection中删除项。
问题:如何从这样的集合中删除项?我可以将未删除的项目传输到数组中,然后可以使用数组而不是原始的HTMLCollection,但不确定是否还有其他更短的方法来完成此操作。JavaScrip