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

jsp页面代码
 <tr>
<th nowrap="nowrap" width="10%" height="50px"
style="text-align: center;">是否评估通过</th>
<td width="40%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
type="radio" id="yesorno" name="yesorno" value="1"
onclick="yes()">是</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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

上一篇:syslog-ng 系统配置


下一篇:ORACLE TO_CHAR的一个问题