js:
var i = 0;
function AddCheckBoxRelay(obj) {
var session = '<%=Session["AnswerType"] %>';
var chkRelay = '<%=chkRelay %>';
if (chkRelay == true) {
$(this).attr("checked", "<%# DataBinder.Eval(Container.DataItem,'IsRelayExt')%>");
i++;
$(this).attr("value", i);
$(this).attr("style", "display:block;");
}
}
html:
<td id="tdChk_<%# DataBinder.Eval(Container.DataItem,"ExtPhoneID")%>" name="tdChk" >
<input id="IsRelayExt_<%# DataBinder.Eval(Container.DataItem,"ExtPhoneID")%>" name="IsRelayExt" type="radio" text="设置中继分机" style='display:none;' onload="javascript:AddCheckBoxRelay(this)" onchange="javascript:SetIsRelay(this)" data-value="<%# DataBinder.Eval(Container.DataItem,"ExtPhoneID")%>" />
</td>