I have a working code to pass value from one id to another, but to do that I need a button to pass it onclick. I want to pass the value without a button directly to the other input. As I did my research i just saw onclick solutions.. Is there any other way or am I stuck with this option
My Code:
window.onload = function() {
document.getElementById('button').onclick = function() {
document.getElementById('email2').value = document.getElementById('email').value;
document.getElementById('firma2').value = document.getElementById('firma').value;
document.getElementById('name2').value = document.getElementById('name').value;
document.getElementById('nummer2').value = document.getElementById('nummer').value;
}
};