Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to combine two input fields in html

$(function() {
  $('#input1, #input2').on('input', function() {
    $('#Voltes5').val(
      $('#input1, #input2').map(function() {
        return $(this).val();
      }).get().join(' ') /* added space */
    );
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #combine #input #fields #html
ADD COMMENT
Topic
Name
7+1 =