UPDATE: although you flagged this as the correct answer, note that you should use the keyup event, not the change or keydown event
$(document).ready(function() { $('input[name=userinput]').keyup(function() { $('#inputval').text($(this).val()); }); });
user434917
source share