I know how to implement copying from one field to another, for this you need to enter "something" in the field and duplication will occur in another field. And how to implement the same duplication, but when you click on the mouse button?

The script, but it works for me when you enter "something" in the field

< script > onload = function() { document.getElementById('res2').oninput = function() { document.getElementById('res21').value = this.value; document.getElementById('res3').oninput = function() { document.getElementById('res31').value = this.value; document.getElementById('res4').oninput = function() { document.getElementById('res41').value = this.value; } } } } < /script> 

    1 answer 1

    Reply from comment:

    Instead of oninput use onclick