I would like to select certain elements in the form by their name, so I assume the use of getElementsByName (name). Then I would like to add value to these elements. How to do it?
boxesEL = document.getElementsByName(boxesName);
for(var x=0;x<=boxesEL.length;x++){
boxesEL[x].value = "some value";
}
I get the error boxesEL [x] - undefined.
source
share