javascript脚本怎样获取repeater中每条数据的编号

来源:百度知道 编辑:UC知道 时间:2024/05/27 14:13:00
一个repeater 中放有checkbox,需要选中checkBox对选中项进行删除,类似邮箱中的功能
我的repeater中放的是客户端控件,怎样实现c#与javascript结合
<asp:Repeater ID="replinkman" runat="server" OnItemDataBound="replinkman_ItemDataBound1">
<HeaderTemplate>
<table class="biao" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="8%"></th>
<th width="16%">姓名</th>
<th width="31%">所在部门</th>
<th width="21%">职务</th>
<th width="24%">手机</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<input type="checkbox" name="chkSelect" value="checkbox" /></td>
<td><asp:Label i

repeater 绑定时,在checkBox的value绑定为编号
然后直接document.getelementbyid(checkBox).value

<input type="checkbox" name="chkSelect" value='<%#eval("编号")%>' />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Generator" content="EditPlus" />
<meta name=