Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript trigger button click using class name

//The following code assumes that the given element has both of those classes;
document.querySelector('.rateRecipe.btns-one-small').click();

//In the following code, the space is meant to imply an ancestor-descendant relationship
document.querySelector('.rateRecipe .btns-one-small').click();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #trigger #button #click #class
ADD COMMENT
Topic
Name
7+9 =