Home >Web Front-end >JS Tutorial >Code to read the value of CheckBox array using Javascript (compatible with IE and firefox)_Form effects
The document.getElementsByName(name) method is used to read the object array. The usage is as follows:
var elements = document.getElementsByName("role");
("role" is the common name of each CheckBox in the CheckBox array)
for: