I have one text box and have written "ABC" in the text box, but I want to obtain the text using jQuery
<input type=text value="ABC"> But when I use jQuery's .html() it returns null
Here's a FIDDLE
<input type="text"> <span></span> $('input').keyup(function() { $('span').text($(this).val()); }); or
$('input').keyup(function() { $('span').html($(this).val()); });
.val()you want to usetext()andhtml()will return nothing.