我有一个简单的表格,可以在选择发布选项时显示额外的选项。但是,我真正想要它做的是仅在从以前非常相似的单选按钮集进行选择组合时才显示这些选项。所以总共有 3 组单选按钮。1.英国或国外邮寄,2.通过卡,账户或现金支付,3.邮寄选项,您可以在下面看到。仅当客户选择英国作为目的地,并且通过(卡或帐户)付款并且需要过帐时,才应显示额外隐藏的过帐选项。
<style type="text/css">
.show { display: block; }
.hide { display: none; }
</style>
<script type="text/javascript">
function showSelect() {
var select = document.getElementById('my_select');
select.className = 'show';
}
</script>
<div id="post">
<fieldset class="post" >
<legend>
<span class="wrap3"> Please choose method of delivery </span>
</legend>
<ul class="radio">
<li>
<input type="radio" name="Postage_Method" id="post" value="Post" onclick="showSelect();"/>
<label for="post"> Please Post</label>
</li>
<select id="my_select" class="hide">
<option value="nxday">Next Day Monday to Friday </option>
<option value="b9">Before 9 a.m. Monday to Friday </option>
<option value="b10">Before 10 a.m. Monday to Friday </option>
<option value="b12">Before 12 a.m. Monday to Friday </option>
<option value="sat9">Saturday Before 9 a.m. </option>
<option value="sat10">Saturday Before 10 a.m. </option>
</select>
<li>
<input type="radio" name="Postage_Method" id="post" value="Arrange Own Pick Up " />
<label for="own"> Will arrange own pick up</label>
</li>
<li>
<input type="radio" name="Postage_Method" id="post" value="Collect in person" />
<label for="collect"> Will collect in person</label>
</li>
</ul>
</fieldset>
</div>