NS_ERROR_XPC_BAD_CONVERT_JS [英] NS_ERROR_XPC_BAD_CONVERT_JS

查看:149
本文介绍了NS_ERROR_XPC_BAD_CONVERT_JS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试appendChild到刚创建的元素(for循环)后,我收到此错误。

这个错误是什么意思?

我想它不可能附加sth。到DOM中并不真正存在的元素。

我如何解决它?

innerHTML的作品,但我不认为它是真正干净和正确的方法

I'm getting this error after trying to "appendChild" to an element that was just created (in for loop).
What does this error mean?
I suppose it's not possible to append sth. to an element that doesn't really exist in DOM.
How do I fix it?
"innerHTML" works, but I don't think it's really clean and proper way to do it.

推荐答案

如果不需要向新元素添加事件,innerHTML没有问题。 >
您可以使用标准方法再次添加事件

There's nothing wrong with innerHTML if you don't need to add events to the new element.
You can add events later using standard methods anyway

这篇关于NS_ERROR_XPC_BAD_CONVERT_JS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆