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
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());
});