请建议如何解决此问题:OptionA 单选按钮显示包含多个复选框的 DIV 块,但 OptionB 单选按钮无法通过左侧单选按钮隐藏显示的块
function ShowHideDiv(chkPassport) {
var dvPassport = document.getElementById("dvPassport");
dvPassport.style.display = chkPassport.checked ? "block" : "none";
}
function ShowHideDivl(chkPassport) {
var dvPassport = document.getElementById("dvPassport");
dvPassport.style.display = chkPassport.checked ? "block" : "none";
}
function getFeaturePrice() {}
function calculateTotal() {}
function hideTotal() {}
<body onload='hideTotal()'>
<div id="wrap">
<form action="" id="softwareform" onsubmit="return false;">
<div>
<div class="cont_order">
<fieldset>
<label class='radiolabel'><input type="radio" name="selectedsoftware" onclick="calculateTotal();ShowHideDiv(this)" />Software A </label>
<label class='radiolabel'><input type="radio" name="selectedsoftware" onclick="calculateTotal();ShowHideDivl(this)" /> software B</label>
<div class='row'>
<div id="dvPassport" style="display: none">
<label class='inlinelabel'><input type="checkbox" name="selectedfeature" onclick="calculateTotal()" />Video
</label> </div>
<div id="dvPassportl" style="display:none">
<label class='inlinelabel'><input type="checkbox" name="selectedfeature" onclick="calculateTotal()" />Video</label>
</div>
</div>
</fieldset>
</div>
<div id="total">
</div>
</div>
</form>
</div>
<script src="script.js"></script>
</body>
Helenr
相关分类