C#中用radio单选Repeater循环数据,js实现

   <asp:Repeater ID="rpt" runat="server">
<ItemTemplate>
<tr data-id="<%#Eval("FID")%>" data-key="FID" class="newTr">
<td class="center">
<%#Eval("FName")%>
</td>
<td class="left">
<%#Eval("FRemark")%>
</td>
<td class="center">
<%#Eval("FBegDate","{0:yyyy-MM-dd}")%>
</td>
<td class="center">
<%#Eval("FEndDate","{0:yyyy-MM-dd}")%>
</td>
<td class="center">
<input type="radio" value='<%#Eval("FID")%>' id="radioCheck" runat="server" name="rdo" /> </td>
</tr>
</ItemTemplate>
<FooterTemplate>
<%
if (rpt != null && rpt.Items.Count == )
{
Response.Write("<tr><td colspan='15' style='color:red;text-align:center'>没有找到您要的相关数据!</td></tr>");
}
%>
</FooterTemplate>
</asp:Repeater>
  function SaveCinet() {
var val = $('input:radio[name="rdo"]:checked').val();
if (val != null) {
if (confirm("确认申请?")) {
var FBillNo = $("#Check").val();
var FUserID = $("#FUserID").val();
$.post("/Ajax.ashx?action=AddActive", { "FBillNo": FBillNo, "FUserID": FUserID }, function (result) {
if (result == "") {
alert("申请成功");
Reset()
}
else {
alert(result);
Reset()
return;
}
});
return true;
}
}
else {
alert("请选择一个活动!");
return;
}
}
上一篇:SpringSecurityOauth RCE (CVE-2016-4977) 分析与复现


下一篇:Dos代码