📌  相关文章
📜  单击页面上的所有按钮 javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:46.252000             🧑  作者: Mango

代码示例1
// 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();