jquery - How To Get Input Value That Saved Before -
i have following function:
$(function () { $('#phone-number').keyup(function(){ var pnumber=$(this).val(); $('.phone-number').text(pnumber) }); });
i can value after keyup event have problem value saved in input text when user double clicks on input. way #phone-number
input type text , .phone-number
div
$('#phone-number').val('78908'); $('#phone-number').on("keyup change", function () { var pnumber = $(this).val(); $('.phone-number').text(pnumber) }); $('#phone-number').change();
are looking this?i added initial value called change event manually mean?no need double click input box because no 1 double clicks input text user type in input text
Comments
Post a Comment