62,268
社区成员
发帖
与我相关
我的任务
分享<asp:Repeater>
<Item....>
<input type="text" id="text<%# Eval("SID") %>" runat="server" onporpertychange="TextChange('text<%# Eval("SID") %>')" />
<input type="button" id="del<%# Eval("SID") %>" value="del" onclick=" Del('<%# Eval(SID"") %>')"/>
</Item....>
</asp:Repeater>
<script type="text/javascript">
function TextChange(id) {
// 这里就可以通过id获得当前触发字符变化事件的文本框:document.getElementById(id)
}
function Del(sid) {
// sid是当前列的关键自增字段,可以通过ajax请求,根据sid删除该列数据,同时重新载入页面,就可以更新repeater的信息了
}
</script>