更新时间:2023-02-19 21:05:55
尝试一下,如果#aa的子代不是br或img,它将删除该子代.
try this, that will remove any child of #aa if that child isn't a br or an img
$("#aa").children().not("br, img").remove()
JQUERY:如何在DIV中删除除BR和IMG之外的所有HTML标签