Just join the event of keyupthis text box and update the span accordingly.
Text box and range
<input type="text" id="txt-url-suffix" />
<div>Your public profile: http://www.twitter.com/<span id="url-suffix" /></div>
And some simple jQuery
var $urlSuffix = $("#url-suffix");
$("#txt-url-suffix").keyup(function() {
var value = $(this).val();
$urlSuffix.text(value);
});
source
share