<label>
<input type="radio" name="quarterOrMonth" th:value="1">季度</label>
<input id="quarterCombobox" class="easyui-combobox">
<label><input type="radio" name="quarterOrMonth" th:value="2">月度</label>
<input id="monthCombobox" class="easyui-combobox">
页面显示:

根据id动态控制combobox的隐藏与显示
$("#quarterCombobox+.combo").hide()//隐藏
$("#monthCombobox+.combo").hide()//隐藏
$("#quarterCombobox+.combo").show()//显示
$("#monthCombobox+.combo").show()//显示
本文介绍了一种使用JavaScript来动态控制页面上ComboBox组件显示与隐藏的方法。通过简单的代码示例展示了如何根据用户的选择来切换季度与月度ComboBox的可见性。
3529

被折叠的 条评论
为什么被折叠?



