The idea should be to locate it first. If there is only one direct parent class, it is best to operate it. If not, it is best to make one yourself;
Clear the html of this parent class, that is to say, delete it. Get this input
$(this).html("");
Create the desired label
var newLabel = "lt; labelgt; lt;/ labelgt;";
Replace html again
$(this).html(newLabel);
This should be a general idea