【发布时间】:2022-09-23 21:57:31
【问题描述】:
我似乎无法理解如何在您访问页面 2-3 秒后自动选择单选按钮
网址:https://livishparis.com/products/pheromone-balm-buy-one-get-two
我希望在访问页面几秒钟后按下“买 2 送 4”按钮。我怎样才能做到这一点? 谢谢<3
标签: javascript html
我似乎无法理解如何在您访问页面 2-3 秒后自动选择单选按钮
网址:https://livishparis.com/products/pheromone-balm-buy-one-get-two
我希望在访问页面几秒钟后按下“买 2 送 4”按钮。我怎样才能做到这一点? 谢谢<3
标签: javascript html
您可以使用 JS 如下所示
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("your_radio_button_id_goes_here").checked = true;
});
【讨论】:
<input type="radio" id="buy2get4" value="buy2get4" checked>
<label for="buy2get4">Buy 2 get 4</label>
在 HTML 输入中,您可以添加检查支持输入。
【讨论】: