jquery - 使用 Javascript/Jquery (Tampermonkey) 单击 Angular JS 元素
问题描述
我正在编写 Tampermonkey 脚本以向现有网站添加更多功能,并且我正在尝试单击具有以下源代码的按钮:
<label _ngcontent-c10="" ngbbuttonlabel="" class="btn btn-agree ng-star-inserted">
<input _ngcontent-c10="" ngbbutton="" type="radio" value="AGREE" ng-reflect-value="AGREE" name="decision">YES
</label>
输入单选按钮隐藏在父标签元素后面。
我尝试使用:(那个特定按钮radio_element.click()
在哪里)单击单选按钮radio_element
,但这只是将状态更改为活动状态。radio_element.checked = true
似乎也不起作用。
解决方案
推荐阅读
- python - Pygame如何让球发生碰撞
- python - How do I fix this 'No file or directory' error
- mysql - 如何使用下面的 whereHas like sql 查询创建雄辩的范围?
- c++ - 如何将 ROS AudioData 消息写入 wav 文件?
- php - 执行 PHP 脚本来处理 Apache2 的 ErrorDocument 500
- mongodb - 如果我在重命名 MongoDB 集合时发送查询会发生什么?
- python - 如何在python的正则表达式模块中获取多个以字符串开头和以字符串结尾的字符串?
- python - 如何在早晚之间获得频繁的时间戳?
- python - 如何通过鼠标单击并拖动来选中或取消选中“PySide2 QStandardItemModel”中的 QStandrdItem 复选框?
- vuetify.js - Vuetify.js:当我关闭并再次打开时,v-dialog 不起作用