JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">
<input class="userTxtA_center">
    <input class="userTxtA_center">

    <input class="userTxtA_center">

</div>
<input type="button" id="button" value="replace elements with new ones">

CSS

.userTxtA_center {
 background-color: red;   
}

.userTxtB_center {
 background-color: white,   
}

JavaScript

var originalHTML = $("#container").html();
$("#button").click(function() {
    
    $("#container").html(originalHTML);
});

$(document).on('focusin', 'input.userTxtA_center', function() {
    this.value = '';
    this.className = 'userTxtB_center';

});