以下表格:
<form action="x.php" method="get" id="myForm">Subscribe:
<div id="radioButtonsWithAdds">
<input type="radio" name="group1" value="one">One month 2,99$
<input type="radio" name="group1" value="two"> Two months 5,98$</div><br>
<input type="checkbox" name="option1" value="withAdds" checked> with adds
<img src="next.png" border="0" alt="enviar" onclick="document.getElementById('myForm').submit();">
</form>
是订阅的第一部分。在这里,用户可以选择一个月或两个月的订阅。
如果用户同意接收添加,勾选复选框,就可以了,他/她可以点击下一步按钮就可以了。
但是,如果用户取消选中“添加”复选框,则会在#radioButtonsWithAdds 的位置显示一个div,其中包含另一组价格不同的单选按钮。
如何在不点击任何提交按钮的情况下检测到复选框 ish?