我正在尝试使用此脚本来隐藏是/否问题之后的问题。换句话说,我希望问题是/否在单击否时隐藏以下问题。
谢谢。
<script>
function ChangeDropdowns() {
if ("Delivery_y:checked") {
document.getElementById('BuyProduct_H').style.display = 'block';
} else if ("Delivery_n:checked") {
document.getElementById('BuyProduct_H').style.display = 'none';
}
}
</script>
这是包含是/否问题的表格。
<table id="YesNo" style="width:100%;">
<tr>
<td class="auto-style2" colspan="3">* Have you recently bought any electronic products from AlGhanim electronics that required delivery/ Installation Service? </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style23">
<input type="radio" name="Delivery" id ="Delivery_y" onclick="displayResult(this.value)" value="Yes" >Yes</td>
<td>(Continue)</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style23">
<input type="radio" name="Delivery" id ="Delivery_n" onclick="displayResult(this.value)" value="No">No</td>
<td>(Terminate)</td>
</tr>
</table>
这是我在回答第一个问题时要隐藏的表格:
<table name="BuyProduct" id ="BuyProduct_H" style="width:100%;">
<tr>
<td class="auto-style2" colspan="3">1- What were the products that you bought? </tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<asp:CheckBox ID="Button11" Text="a. Air Conditioning" runat="server" /> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<asp:CheckBox ID="Button12" Text="b. TV Radio (TV, Home Theatre, etc.)" runat="server" /></td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<asp:CheckBox ID="Button13" Text="c. Refrigeration" runat="server" /> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<asp:CheckBox ID="Button14" Text="d. Laundry (Washer, Dryer, etc)" runat="server" /> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<asp:CheckBox ID="Button15" Text="e. Dishwasher" runat="server" /></td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<asp:CheckBox ID="Button16" Text="f. Water Treatment (Water Dispencer)" runat="server" /> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
<asp:CheckBox ID="Button17" Text="g. Small Housewares (Microwave, Kitchen appliances, etc.)" runat="server" />
<br />
<asp:CheckBox ID="Button18" Text="h. Others Please Specify" runat="server" /> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style51"></td>
<td>
<asp:TextBox ID="TextBox26" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td colspan="2">
</td>
</tr>
</table>