How to get the text value from the SOURCE to the TARGET,after the page fully loaded?
SOURCE
<input id="gclid_field">
TARGET
<input id="gclid_form">
SCRIPT
window.addEventListener('load', function () {
document.getElementById('gclid_field').value
document.getElementById('gclid_form').setAttribute('value');
})
2
Answers
better to store value first, then set value directly, not from setAttribute: