div
div是一个对象,所以它会有--proto--,而且由于其有很多构造函数,每个构造函数都会留下一层prototype.
div的--proto--
![](https://img.haomeiwen.com/i19247518/34241dcc68234f34.png)
Node
增
![](https://img.haomeiwen.com/i19247518/377849d28adae424.png)
不能混着用是因为不在同一个层面上,appendChild是Node层面的proto上独有的函数,而innertext则是element
**上面创建也好,这也好那也好都是只在JS数据中储存,没到html中,所以要把他插回html中
![](https://img.haomeiwen.com/i19247518/9ac60bbebad63a9a.png)
有时候也会插入到head中,看情况的,有些是样式
eg.
![](https://img.haomeiwen.com/i19247518/b2f725818cdda9d2.png)
答案是:
![](https://img.haomeiwen.com/i19247518/038460aff8afd1bf.png)
因为一个元素是没办法同时出现在两个地方,除非复制粘贴,否则后来后到
网友评论