我需要在选中该复选框时显示一个表格,但它不起作用。您可以在下面找到我的脚本、复选框和表格
<script>
function checked() {
var checkBox = document.getElementById("check");
var concession = document.getElementById("hidden");
if (checkBox.checked == true){
concession.style.display = "block";
} else {
concession.style.display = "none";
}
}
</script>
<input type = "checkbox" name = "discount" id = "check" onclick = "checked()">
<table id = "hidden" class = "center" style = "display:none">
<tr>
<th>102-2 Taxable income is reduced by 400AZN</th>
<th></th>
<th><input type = "radio" name = "400"></th>
</tr>
<tr>
<th>102-3 Taxable income is reduced by 200AZN</th>
<th></th>
<th><input type = "radio" name = "200"></th>
</tr>
<tr>
<th>102-4 Taxable income is reduced by 100AZN</th>
<th></th>
<th><input type = "radio" name = "100"></th>
</tr>
<tr>
<th>102-5 Taxable income is reduced by 50AZN</th>
<th></th>
<th><input type = "radio" name = 50"></th>
</tr>
</table>
我该如何解决这个问题?
胡子哥哥
慕桂英4014372
慕哥6287543
相关分类