这是我要单击的按钮的HTML:

<div style="" class="widgetPlaceholder widgetExpireTurbo" data-widget="turboBinary_tradologic_expireTurbo">

<input type="button" value="15s" class="expireTurboRuleInterval activeRule" data-ruleid="149">
<input type="button" value="30s" class="expireTurboRuleInterval" data-ruleid="148">
<input type="button" value="45s" class="expireTurboRuleInterval" data-ruleid="147">
<input type="button" value="1m" class="expireTurboRuleInterval" data-ruleid="106">
<input type="button" value="2m" class="expireTurboRuleInterval" data-ruleid="107">
<input type="button" value="5m" class="expireTurboRuleInterval" data-ruleid="108">

</div>


我希望通过jquery来点击带有value="30s"的按钮。

这是URL:https://binarykings.co.uk/traderoom-aspx?game=turbo&view=single&lang=en&filter=currencies

谢谢

最佳答案

使用attribute-equals-selector

jQuery('input[value="30s"]').click();

关于javascript - jQuery以编程方式单击没有唯一ID或类的按钮,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23516310/

10-10 00:12