方法1:
$('#t_node_parent_id').empty();
方法2:
$('#t_node_parent_id').html("");
本文介绍了在前端开发中清空DOM元素的两种常见方法。方法一使用empty()函数,方法二通过设置html属性为空字符串实现。这两种方法适用于需要清除元素内容的场景。
方法1:
$('#t_node_parent_id').empty();
方法2:
$('#t_node_parent_id').html("");
8663

被折叠的 条评论
为什么被折叠?