87,996
社区成员




function setText(ID, v,checked) {
var txt = document.getElementById(ID), vs = txt.value;
if (checked) vs += (vs == '' ? ',' : '') + v + ',';
else vs = vs.replace(',' + v + ',', ',');
txt.value = vs;
}
<asp:CheckBox ID="cb" runat="server" Text='<%#Eval("RealName")%>' onclick="setText('<%#txtPersons.ClientID%>',this.nextSibling.innerHTML,this.checked)"/>