<input type="text" id="name" />
<span id="display"></span>
So that when user enter something inside "#name",will show it in "#display"
<input type="text" id="name" />
<span id="display"></span>
So that when user enter something inside "#name",will show it in "#display"
$('#name').keyup(function() {
$('#display').text($(this).val());
});
The previous answers are, of course, correct. I would only add that you may want to prefer to use the keydown
event because the changes will appear sooner:
$('#name').keydown(function() {
$('#display').text($(this).val());
});