Javascript 删除函数中动态添加的元素
我有下面的javascript。它动态添加选定日期的行。我想随时打电话试试Javascript 删除函数中动态添加的元素,javascript,jquery,html,Javascript,Jquery,Html,我有下面的javascript。它动态添加选定日期的行。我想随时打电话试试 $("#resultContainer").remove(); //which will remove all child tags 我尝试使用$(“#resultContainer”).remove(str);在fnUpdateDate函数中,但它正在抛出错误str未定义。append将不会删除元素…对于混淆,非常抱歉。我使用了remove.。只需尝试$(“#resultContainer”)。remove(您的_I
$("#resultContainer").remove(); //which will remove all child tags
我尝试使用$(“#resultContainer”).remove(str);在fnUpdateDate函数中,但它正在抛出错误str未定义。
append
将不会删除元素…对于混淆,非常抱歉。我使用了remove.。只需尝试$(“#resultContainer”)。remove(您的_ID或任何其他_选择器)代码>但ID必须是唯一的…我想删除我选择的子标记。不是所有的标签。上面我贴了一张照片。。