0

Multiple textbox copy on single click

Hi there Iā€™m trying to copy text from two different text boxes from on copy button. var copytxt1 = document.getElementById('copy1'); var copytxt2 = document.getElementById('copy2'); copytxt1.select(); // How can I put copytxt2 in the same line so I can copy same time. Please see what I tried and thought it would work https://code.sololearn.com/W87wkD3FQ7th/?ref=app

20th Aug 2022, 6:21 PM
Mawande Notununu
Mawande Notununu - avatar
1 Answer
0
Firstly I noticed you are trying to copy from your input box which is wrong. Do this Create a div, that the values being inputed on the input box goes to, then you can copy from that box, that should work fine
23rd Aug 2022, 10:08 AM
Bamisile Tolulope
Bamisile Tolulope - avatar