您现在的位置是:首页 > 电脑技术查询 > web开发

如何取到复选框对应的文本框

编辑:chaxungu时间:2022-10-10 23:24:03分类:web开发

怎么取到复选框对应的文本框

效果图是这样的:

如果文本框对应的复选框打勾了,则文本框必须输入数据,在提交时提示文本框不能为空。代码是先循环出行,单元格里再且套循环。怎么判断是哪个复选框打勾了?怎么取到对应的文本框?
代码如下:
<table>
<s:iteratorvalue="listSampleTask"status="status">
<tr>
<td>
<s:propertyvalue="strTaskName"default="--"/><spanstyle="color:red">(<s:propertyvalue="intSampleBatchNumber"/>次&nbsp;剩余:<s:propertyvalue="intSampleBatchNumber-intSyNumber"/>次)</span>
</td>
<td>
<s:iteratorvalue="listSampleTaskConfig"status="status">
<inputtype="checkbox"name="check"value="<s:propertyvalue='lngTaskSid'/>-<s:propertyvalue='strClassDicCode'/>"/>
<s:propertyvalue="objSampleBreedClass.strDicName"/>
<spanstyle="color:red">(<s:propertyvalue="intSampleBatchNumber"/>次&nbsp;剩余:<s:propertyvalue="intSampleBatchNumber-intDoneNumber"/>次)</span>
&nbsp;&nbsp;抽样数量:<inputtype="text"name="cysl"value="<s:propertyvalue='cyNumber'/>"maxlength="50">
</s:iterator>
</td>
</tr>
</s:iterator>
</table>
------解决思路----------------------
引用:Quote: 引用:
Quote: 引用:
f12这里有代码

F12也找不到这个页面的源代码,你要不远程帮我看下。
qq给我个