Answers for "js trigger click onclass"

1

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();
Posted by: Guest on February-18-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language