我对方法removechild有问题
我是 Stackoverflow 的新人,一月份开始编程,自己的小型应用程序已经可以实现,现在我在使用 JavaScript 时遇到了有关 removeChild 方法的问题,因为我不知道如何将此方法与其他方法和函数一起使用结合或必须写。 提前致谢
I'm new here on Stackoverflow, started programming in January, small own applications could already be implemented and now I have a problem with JavaScript with the removeChild method, because I don't know how to use this method with other methods and functions can combine or must write.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您要做什么,您的问题应该更具体。
例如,假设您想从列表中删除所有项目,这里是可以使用的内容的示例。
如果您只想删除一个孩子,则需要知道父母的ID,就这样做了...
如果您想要
https://www.w3schools.com/jsref/met_node_removechild.asp.asp
Not really sure what you are trying to do, your question should be a bit more specific.
Just as an example, say you want to remove all items from a list, here's an example of what could be used.
If you simply want to delete one child you would need to know the parent's Id, it is done like so...
you can try the W3School documentation if you'd like
https://www.w3schools.com/jsref/met_node_removechild.asp