【发布时间】:2013-06-05 17:13:21
【问题描述】:
我有一个单选按钮列表来选择两个服务之一。
<table align="center" width="100%">
<tr>
<td colspan="2">
<input type="radio" name="selectedValue" value="serviceWise">
Service-Wise
<input type="radio" name="selectedValue" value="districtWise">
District-Wise
</td>
</tr>
</table>
<table>
<tr>
<td>
Service Name
</td>
</tr>
</table>
我需要为这两个选项显示不同的行。 When Service-Wise is selected then Service name should be displayed and when District-Wise is selected then District name should be displayed.例如在上面的代码中,我显示了服务名称,但实际上它应该只在选择服务明智选项时出现。我只停留在显示部分,这就是为什么我没有在代码中提到任何数据检索部分。我想在jsp页面本身做,非常感谢有人的帮助。
【问题讨论】:
-
所以您想根据所选单选按钮在页面加载时显示此“服务名称”,还是在页面加载后动态执行此操作? (即用户更改单选按钮,新数据显示在 TD 标签中)如果页面加载后,那么您需要 JavaScript。否则@DwB 已经回答了你的问题。
-
我想在页面加载后执行此操作,当用户更改单选按钮时,显示会相应更改
标签: jsp