Answers for "how to get value from input field while typing"

0

how to get value from input field while typing

$('input[name="noofppl"]').keyup(function(){
  console.log($(this).val());
});
 
$('input[name="noofppl"]').focusout(function(){
  if($(this).val().length < 20){
    alert("Minimum character is 20!!!");
  }
});
Posted by: Guest on September-01-2020
0

how to get value from input field while typing

$("#txt").keyup(function(event) {
  text = $(this).val();
  $("div").text(text);
});
$('#txt').focusout(function(){
  if($(this).val().length < 20){
  	alert(" Minimum 20 Words required...!! ");
	}
})
Posted by: Guest on September-01-2020

Code answers related to "how to get value from input field while typing"

Browse Popular Code Answers by Language