on type input jquery code example

Example 1: jquery on input

$('input').on('input propertychange', ()=>{});

Example 2: jquery when you typing in input

$('input[name="noofppl"]').keyup(function(){
  console.log($(this).val());
});

Example 3: jquery to copy two input fields into one with a space between

jQuery(function($) {
  var $firstname = $('input[name="firstname"]');
  var $lastname = $('input[name="lastname"]');
  var $fullname = $('input[name="fullname"]');

  $firstname.add($lastname).keyup(function() {
    $fullname.val($firstname.val() + ' ' + $lastname.val());
  });
});