JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" value="temporary" class="textbox"/>
<input type="text" value="temporary" class="textbox"/>
<input type="text" value="temporary" class="textbox"/>
<input type="text" value="temporary" class="textbox"/>
<input type="checkbox" class="Disable"/>
JavaScript
$(document).ready(function() {
$(".Disable").change(function(){
if($(".Disable").is(":checked"))
{
$(".textbox").val('');
$(".textbox").prop("disabled",true);
}
else
{
$(".textbox").prop("disabled",false);
}
})
});