用radio控制<tr>的隐藏和显示问题
2024-10-18 09:33:12
jsp页面代码
<tr>
<th nowrap="nowrap" width="10%" height="50px"
style="text-align: center;">是否评估通过</th>
<td width="40%"> <input
type="radio" id="yesorno" name="yesorno" value="1"
onclick="yes()">是</input>
<input type="radio" id="yesorno" name="yesorno" value="0" onclick="no()" selected = "false">否</input>
</td>
</tr>
<tr id="third" >
<th nowrap="nowrap" height="50px" style="text-align: center;">指派第三方机构</th>
<td> <input
id="ThirdPart" name="ThirdPart"
class="easyui-combobox input160"
data-options="valueField:'id',textField:'text',editable: false, panelHeight: 120,
url:'${ctx}/rescue/surver/send/comlist.action?code=${userDep.sysDepartment.sysDepartmentId}',method:'get'" /> </td>
</tr>
<tr id = "reason" style="display: none">
<th nowrap="nowrap" height="100%" style="text-align: center;">退回原因</th>
<td> <textarea
id="reason" name="reason" class="easyui-validatebox"
cols="157"
data-options="required:true, validType: 'length[0,500]'"
maxlength="500"></textarea>
</td>
</tr>
tr
js代码
//显示第三方机构
function yes(){
$("#reason").css('display', 'none');
$("#third").css('display', 'block');
}
//显示退回原因
function no(){
$("#third").css('display', 'none');
$("#reason").css('display', 'block');
}
js
最新文章
- [转载]《民航科技》2012年4月专家论坛:罗喜伶《SWIM技术国际研究动态及对中国民航的借鉴意义》
- Wince 6.0适用 .NET 使用HttpRequest的Post上传文件,服务端的Web API接收Post上传上来的文件 代码
- EasyUI - DataGrid 去右边空白滚动条列 分类: JavaScript 2014-09-03 10:46 1090人阅读 评论(2) 收藏
- 【leetcode】Combination Sum
- css构造文本
- php部分---面向对象静态、抽象类、oop接口、加载类、魔术方法、关键字。
- Server Tomcat v7.0 Server at localhost failed to start解决办法
- 如何使用C#去灰度化一幅图像
- json 转对象
- 【Android】数据库的简单应用——升级数据库
- Visual Studio下Qt编程中对中文的处理
- 用caffe给图像的混乱程度打分
- Sass之Compass学习笔记
- js原型与原型链探究
- Netty 系列九(支持UDP协议).
- K8S 高级调度方式
- 7.01-beautiful_soup3
- 20165326 java实验四
- jquery 无缝轮播
- Gradle - Manifest