JSFiddle - React, Tailwind, and code Playground

by Jesin A

HTML

<p><input type="text" id="txt1" /></p>
<p><input type="text" id="txt2" disabled="disabled" value="abc" /></p>
<p id="url">&nbsp;<p>

CSS

#url {
    margin-top: 20px;
    border: 2px dotted #333;
}

JavaScript

jQuery(document).ready(function(){
    $('#txt1').keypress(function(){
        $('#url').html('<a href="http://' + $(this).val() + '?id=' + $('#txt2').val() + '">A dynamic link</a>');
    });
});