JSFiddle - React, Tailwind, and code Playground
by abhitalks
HTML
<input id="btn" type="button" value="Get Current Time" />
<p id="tm" />
JavaScript
$("#btn").on("click", function () {
$.ajax({
dataType: 'jsonp',
url: 'http://timeapi.org/utc/now.json',
success: function (result) {
$("#tm").text(result.dateString);
}
});
});