Current location - Quotes Website - Signature design - How to replace input with label using js or jquery
How to replace input with label using js or jquery

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