The reason you’re seeing that error is because document.getElementsByName returns a NodeList of elements. And a NodeList of elements does not have a .value property.
Use this instead:
document.getElementsByName("acc")[0].value
The reason you’re seeing that error is because document.getElementsByName returns a NodeList of elements. And a NodeList of elements does not have a .value property.
Use this instead:
document.getElementsByName("acc")[0].value