JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" id="bt" value="0">
JavaScript
$(document).ready(function(){
$("#bt").click(function(){
if( $(this).val() == 0 ){
$(this).val(1);
}else{
$(this).val(0);
}
})
})