$(".main").append("
This is span");
$(" .main").append("
");
alert($(".main").html());
This is not normal, as long as there are two This exception will occur when append() html code is used. I don’t know why. I searched and found no relevant information. The temporary solution is to avoid appending html code in this way.