当前位置:网站首页>Method to delete all child nodes of an element
Method to delete all child nodes of an element
2022-07-18 17:50:00 【Qin ~ ~】
Method to delete all child nodes of an element
<script>
/* The first method */
const element = document.getElementById('top');
while(element.firstChild){
element.removeChild(element.firstChild)
}
/* The second method */
for(let i = childs.length - 1; i >= 0; i --) {
f.removeChild(childs[i]);
}
</script>
边栏推荐
猜你喜欢

Why should slab be dyed

How to reinstall win10? One click reinstallation of graphic version of win10 tutorial

HCIA-R&S自用笔记(9)数据转发过程、单播/多播/组播

Flink1.7从安装到体验

一文带你浏览Graph Transformers

Detailed explanation of file parsing vulnerability

数据湖(十一):Iceberg表数据组织与查询

【SQL注入】order by 注入:联合盲注、报错、堆叠注入

(pc+wap) industry general website of Zhimeng template company

How to solve the problem of 8080 port being occupied
随机推荐
如何解决8080端口被占用
balanced binary tree
Tianyi beyond has a pre-sale of 157700 from the reform, and gross Innovation: the product power is absolutely in the first camp
【白盒测试】逻辑覆盖和路径测试的设计方法
2. STM32F4 USB协议研究 - SD卡模拟U盘
Quick completion guide of manipulator (zero five): resources related to manipulator
15. 三数之和【List<List<Integer>> ans、 ans.add(Arrays.asList(nums[i], nums[j], nums[k]))】
PostgreSQL source code (5) buffer management
一 kernel编译系统概述
Multitree -- > b tree and b+ tree
【CVA估值训练营】如何快速读懂上市公司年报(第一讲)
Dataset:White Wine Quality白葡萄酒品质数据集的简介、下载、使用方法之详细攻略
Flink1.7 from installation to experience
HCIA-R&S自用笔记(6)(网络层)ICMP、IP协议基础及分片
MySQL master / master-slave replication /xtrabackup/binlog database recovery and common modules using ansible
Flink1.7 from installation to experience
One week's wonderful content sharing (issue 12) repetition
Why should slab be dyed
V831——AprilTag标签识别
Scope and constructor details