Answers for "click all buttons on page javascript"

2

click all buttons on page javascript

// Get all buttons with the name 'all' and store in a NodeList called 'buttons'
   var buttons = document.getElementsByName('all');

    // Loop through NodeList and call the click() function on each button
    for(var i = 0; i <= buttons.length; i++)  
       buttons[i].click();
Posted by: Guest on June-11-2021

Code answers related to "click all buttons on page javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language