appendChild is not a function

Posted leahtao的前端积累

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了appendChild is not a function相关的知识,希望对你有一定的参考价值。

domElement.appendChild()中,获取domElement 时,使用了getElementsByClassName() 这类获得的结果是数组的函数,而没有定位到其中的某一个对象。改正如var domElement = getElementsByClassName("div") [0]。

以上是关于appendChild is not a function的主要内容,如果未能解决你的问题,请参考以下文章