lundi 10 septembre 2018

How can i click button based on text instead of Class

please i can't edit this code to work in buttons based on text instead of class or make it for both by class name and text

for example

    <button class="same">click-me</button>
    <button class="same">dont-click-me</button>

now i want code to click on the "click-me" button

this what i used in my code to click by class

 var inputs = document.querySelectorAll('._t3:not(.hidden_elem)');

thanks and hope to find answers help me

Aucun commentaire:

Enregistrer un commentaire