checkbox 选中,后面的多个textarea提示必填,请高手帮忙

efanlx 2013-08-11 09:16:48
checkbox 选中,后面的多个textarea提示必填,由于那些事项都是从数据库里读出来的,个数无限制的。
请高手帮忙解决,急!感谢!

<tr>
<td bgcolor="#FFFFFF" class="f_c">事项<Input type="hidden" name="id_1" id="id_1" value="2"></td>
<td bgcolor="#FFFFFF" colspan="4">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#c7e9ff">
<tr>
<td bgcolor="#FFFFFF" width="35%"><input type="checkbox" name="id_1[]" id="id_1" value="A">  A、项目1</td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="name_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="bsfs_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="17%"><textarea name="synx_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="35%"><input type="checkbox" name="xtgn_1[]" id="xtgn_1" value="B">  B、项目2</td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="name_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="bsfs_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="17%"><textarea name="synx_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="35%"><input type="checkbox" name="xtgn_1[]" id="xtgn_1" value="C">  C、项目3</td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="name_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="bsfs_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="17%"><textarea name="synx_1" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="f_c">成效<Input type="hidden" name="id_2" id="id_2" value="2"></td>
<td bgcolor="#FFFFFF" colspan="4">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#c7e9ff">
<tr>
<td bgcolor="#FFFFFF" width="35%"><input type="checkbox" name="id_2[]" id="id_2" value="A">  A、成效1</td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="name_2" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="bsfs_2" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="17%"><textarea name="synx_2" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="35%"><input type="checkbox" name="xtgn_2[]" id="xtgn_2" value="B">  B、成效2</td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="name_2" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="24%"><textarea name="bsfs_2" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
<td bgcolor="#FFFFFF" width="17%"><textarea name="synx_2" class="comments" style="height:expression((this.scrollHeight>150)?'150px':(this.scrollHeight+16)+'px');overflow:auto;"></textarea></td>
</tr>
</table>
</td>
</tr>


</table>
...全文
202 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
fzfei2 2013-08-11
  • 打赏
  • 举报
回复
在你另贴中已回

87,920

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧