title: Copy value from input 1 to input 2 onclick
body: <p>Looking for a script that copies input value 1 to input 2 on button click and add +1 to sets text box.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>b = document.getElementById('tussenstand').value;
  var theTotal1 = b;
  
  $(document).on("click", "#button1", function(){
      theTotal1 = Number(theTotal2) 
      $('#eindstand').val(theTotal2);        
  });
  $('#eindstand').val(theTotal2);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input id="tussenstand"&gt;&lt;/input&gt;
  &lt;input id="eindstand"&gt;&lt;/input&gt;
  &lt;input id="sets"&gt;&lt;/input&gt;
  
  &lt;button id="button1"&gt;click&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks in advance.</p>