1 // Get all buttons with the name 'all' and store in a NodeList called 'buttons'
2 var buttons = document.getElementsByName('all');
3
4 // Loop through NodeList and call the click() function on each button
5 for(var i = 0; i <= buttons.length; i++)
6 buttons[i].click();
7