JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" size="50" style="padding:10px 20px" />
JavaScript
$('input').change( function() {
s = $(this).val();
if (s && !s.match(/^[a-zA-Z]+:\/\//))
{
s = 'http://' + s;
console.log(s)
$(this).val(s)
}
});