Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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">
Comment

PREVIOUS NEXT
Code Example
Java :: java stream list order lambda 
Java :: textfield invisible java 
Java :: iterator java8 
Java :: Calculator repeat 
Java :: javacal 
Java :: null check in line java 
Java :: Declaration of java list 
Java :: Java TestNG Data Provider 
Java :: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 
Java :: lombok error unnamed 
Java :: Implementation of HashMap Class in Java map 
Java :: Java Boolean Literals 
Java :: .throwFor in java 
Java :: retrofit with api key post 
Java :: banner generator spring boot 
Java :: android studio setbackgroundcolor drawable 
Java :: import txt.xz file to android studio app 
Java :: split the argument String and add the tokens into a list 
Java :: Switch statement expressions jdk12+ 
Java :: sorted hashmap java 
Java :: enum to get status name from list using status id 
Java :: implement hashmap 
Java :: javafx line chaart duplicate series added 
Java :: 710*12 
Java :: set default messaging app android manifest 
Java :: Returning an Array from a Method 
Java :: java tic tac toe gui based using applet 
Java :: randpm years java 
Java :: java was started but returned exit code=13 
Java :: Java Insert Elements to LinkedHashSet 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =