JSFiddle - React, Tailwind, and code Playground
HTML
<section id="mySection">
<form name="form_clock">
<input type="text" name="clock_txt" size="10" id="clock_txt">
</form>
</section>
JavaScript
$("#mySection").ready(function new_clock() {
clock = new Date() ;
hour = clock.getHours();
minutes = clock.getMinutes() ;
seconds = clock.getSeconds() ;
print_clock= hour + " : " + minutes + " : " + seconds;
$("#clock_txt").val(print_clock);
setInterval(new_clock, 1000);
});