有关下拉框和文本框的联动问题!高分送出!!
在工作中碰到一个这样的问题:根据下拉框的选择来决定文本框是否需要,比如你选择了“专用”,下面的“单位代码”和“单位名称”就需要有文本框,如果选择了“通用”,就不要出现文本框,代码如下:
下拉框代码:
<td width="15%" nowrap bgcolor="#D6D3EF" align="right" >类型:</td>
<td nowrap align="left">
<html:select property="agreeSetsEntity.xylx">
<html:option value='1'>专用</html:option>
<html:option value='2'>通用</html:option>
</html:select>
</td>
“单位代码”和“单位名称”代码:
<tr>
<td nowrap bgcolor="#D6D3EF"><div align="right">单位代码:</div></td>
<td nowrap >
<html:text property="agreeSetsEntity.xyqddwdm" size="32" maxlength="32"/>
</td>
<td nowrap bgcolor="#D6D3EF"><div align="right">单位名称:</div></td>
<td nowrap ><div align="left">
<html:text property="agreeSetsEntity.xyqddwmc" size="16" maxlength="32" /></div>
</td>
</tr>
求救高手!!