jsp页面代码
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>
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 }