我有两个按钮(描述交付类型)。选择后,我必须按另一个按钮才能继续。有什么方法可以让我在选择后自动继续吗?
这是我选择之前的代码:
<button type="button" class="button btn-delivery-method" data-delivery-method="s_method_free">
<span class="btn-delivery-method__label">Select</span>
</button>
这是我选择后的代码:
<button type="button" class="button btn-delivery-method delivery-method__selected" data-delivery-method="s_method_free">
<span class="btn-delivery-method__label">Select</span>
</button>
这是我继续的第三个按钮:
<button type="button" class="button btn-large--alt" onclick="shippingMethod.save()">
Continue
</button>
谢谢
最佳答案
可以给前两个按钮添加onclick事件。
顺便说一句,按下前两个按钮中的任何一个后,代码会做什么?
关于javascript - 选择后重定向按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29743215/