JSFiddle - React, Tailwind, and code Playground
HTML
<input id="foo" name="foo" type="text" value="" size="55" />
JavaScript
jQuery(document).ready(function() {
var foo = jQuery('#foo');
function updateTime() {
var now = new Date();
foo.val(now.toString());
}
updateTime();
setInterval(updateTime, 5000); // 5 * 1000 miliseconds
});