JS agregar valor à entrada HTML
document.getElementById("myInputID").value = "My Value"; //set value on myInputID
Grepper
document.getElementById("myInputID").value = "My Value"; //set value on myInputID
function product(a, b) {
return a * b;
}
function setInputValue(input_id, val) {
document.getElementById(input_id).setAttribute('value', val);
}