Answers for "Copying value from one input field to another input field using checkbox"

0

Copying value from one input field to another input field using checkbox

function copyTextValue(bf) {
  var text1 = bf.checked ? document.getElementById("Name1").value : '';
  document.getElementById("Name2").value = text1;
  document.getElementById("Name3").value = text1;
}

<input type="checkbox" name="check1" onchange="copyTextValue(this);" />
<input id="Name1"><input id="Name2"><input id="Name3">
Posted by: Guest on December-22-2021

Code answers related to "Copying value from one input field to another input field using checkbox"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language