<table class="tableBorder" border="0" cellpadding="0" cellspacing="0" id="tableBrowseRangeList" width="100%" >
<tr class="tableHeader" height="25px">
<th align="center">删除</th>
<th align="center">负责公司</th>
<th align="center">负责人</th>
</tr>
<asp:Repeater runat="server" ID="repeater1">
<ItemTemplate>
<tr class="tableRow" οnmοuseοver="this.className='tableRowSelected';" οnmοuseοut="this.className='tableRow';" height="25px">
<td align="center"><a href="#" οnclick="tableBrowseRangeList.deleteRow(this.parentNode.parentNode.rowIndex);">删除</a></td>
<td>
<select name="selcCorp" id="selcCorp" runat="server" style="width:100%"
οnchange="showUserList(this.value, this.parentNode.parentNode.rowIndex)"></select>
<asp:Literal ID="LiteralCorpId" Visible="false" runat="server" Text='<%#Eval("user_corp_id") %>'></asp:Literal>
<asp:Literal ID="LiteralUserId" Visible="false" runat="server" Text='<%#Eval("user_id") %>'></asp:Literal>
</td>
<td><select name="selectMan" id="selectMan" runat="server" style="width:100%" ><option>--</option></select></td>
</tr>
</ItemTemplate>
</asp:Repeater>
<tr class="tableRow" οnmοuseοver="this.className='tableRowSelected';" οnmοuseοut="this.className='tableRow';" height="25px">
<td align="center"><a href="#" οnclick="tableBrowseRangeList.deleteRow(this.parentNode.parentNode.rowIndex);">删除</a></td>
<td>
<select name="selcCorp" id="selcCorp" runat="server" style="width:100%"
οnchange="showUserList(this.value, this.parentNode.parentNode.rowIndex)"></select>
<asp:Literal ID="LiteralCorpId" Visible="false" runat="server" Text='<%#Eval("user_corp_id") %>'></asp:Literal>
<asp:Literal ID="LiteralUserId" Visible="false" runat="server" Text='<%#Eval("user_id") %>'></asp:Literal>
</td>
<td><select name="selectMan" id="selectMan" runat="server" style="width:100%" ><option>--</option></select></td>
</tr>
</table>
js脚本读取值后拼接并放到隐藏域中(拼接格式1,1;1,2)
function addButtonDuty() {
var strSql="";
for(var i=1;i<tableBrowseRangeList.rows.length;i++){
if(tableBrowseRangeList.rows[i].cells[1].childNodes[0].value!="--" && tableBrowseRangeList.rows[i].cells[2].childNodes[0].value!="--" ){
strSql += tableBrowseRangeList.rows[i].cells[1].childNodes[0].value + "," ;
strSql += tableBrowseRangeList.rows[i].cells[2].childNodes[0].value;
strSql += ";";
}
}
if(strSql!=""){
strSql = strSql.substring(0,strSql.length-1);
}
document.all.hideLabel2.value=strSql;