用radio控制<tr>的隐藏和显示问题

jsp页面代码
 1 <tr>
 2                                     <th nowrap="nowrap" width="10%" height="50px"
 3                                         style="text-align: center;">是否评估通过</th>
 4                                     <td width="40%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
 5                                         type="radio" id="yesorno" name="yesorno" value="1"
 6                                         onclick="yes()"></input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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
原文地址:https://www.cnblogs.com/jiangjianzhu/p/5442548.html