How to click on all buttons at the same time by a button attribute using js?

  • 0
    There are many buttons on the page with the same attribute, how can you press them all at the same time?
    JavaScript Anonymous, Aug 7, 2020

  • 1 Answers
  • 0
    document.querySelectorAll('[атрибут]').forEach(el => el.click());


    If protection against software pressing is used, or the buttons have tricky logic and / or not buttons at all, it will not work.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!