用radio控制<tr>的隐藏和显示问题
2016-10-13 10:57
543 查看
jsp页面代码
tr
js代码
js
1 <tr> 2 <th nowrap="nowrap" width="10%" height="50px" 3 style="text-align: center;">是否评估通过</th> 4 <td width="40%"> <input 5 type="radio" id="yesorno" name="yesorno" value="1" 6 onclick="yes()">是</input> 7 <input type="radio" id="yesorno" name="yesorno" value="0" onclick="no()" selected = "false">否</input> 8 </td> 9 </tr> 10 <tr id="third" > 11 <th nowrap="nowrap" height="50px" style="text-align: center;">指派第三方机构</th> 12 <td> <input 13 id="ThirdPart" name="ThirdPart" 14 class="easyui-combobox input160" 15 data-options="valueField:'id',textField:'text',editable: false, panelHeight: 120, 16 url:'${ctx}/rescue/surver/send/comlist.action?code=${userDep.sysDepartment.sysDepartmentId}',method:'get'" /> 17 18 </td> 19 </tr> 20 <tr id = "reason" style="display: none"> 21 <th nowrap="nowrap" height="100%" style="text-align: center;">退回原因</th> 22 <td> <textarea 23 id="reason" name="reason" class="easyui-validatebox" 24 cols="157" 25 data-options="required:true, validType: 'length[0,500]'" 26 maxlength="500"></textarea> 27 </td> 28 </tr>
tr
js代码
1 //显示第三方机构 2 function yes(){ 3 $("#reason").css('display', 'none'); 4 $("#third").css('display', 'block'); 5 } 6 //显示退回原因 7 function no(){ 8 $("#third").css('display', 'none'); 9 $("#reason").css('display', 'block'); 10 }
js
相关文章推荐
- ViewPager,RadioGroup,FragmentManager 详解 <一> 主菜单 RadioGroup 控制显示Fragment ,FragmentManager
- javaScript控制<div>的显示,隐藏
- Bootstrap 中列表行 <tr> 的显示样式
- sp使用<c:choose>标签来控制内容显示
- struts2中级联菜单标签<s:doubleselect>的若干常见问题(二级菜单不显示,FreeMarker问题)
- <s:select>标签自动生成<tr><td>的问题~
- 关于<input type="text">不能显示空格的问题
- Android实战简易教程<五十一>(ListView实现子控件的动态显示和隐藏、checkbox全选和反选)
- JSP中<img>标签图片在浏览器中不显示问题
- struts2的form等表单布局问题,去掉其自动生成的<table><tr><td>标签
- 在table中<tr>的display:block显示布局错乱
- jsp使用<c:choose>标签来控制内容显示
- <Linux+Qt>Qt4编程控制mplayer嵌入自定义界面监控或视频显示
- 开发日志:<s:select>标签显示从后台传过来的空格问题
- Android实战简易教程<五十九>(EventBus小实例-传值、控制其他页控件显示)
- 关于<input type="text">不能显示空格的问题
- <一>初探js特效魅力之div显示隐藏变色02
- <s:textfield>标签的tr问题
- 解决用<img src="<%# Eval("ShowPhoto")%>"动态绑定图片,发布到IIS上无法显示的问题
- Android ListView中设置的字体颜色显示错乱问题 && SparseArray<E>的使用