📌  相关文章
📜  javascript 触发按钮单击使用类名 - Javascript 代码示例

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

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