So that when user enter something inside \"#name\",will show it
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:
keydown
$('#name').keydown(function() { $('#display').text($(this).val()); });