function changeCheckboxText(checkbox) { if (checkbox.checked) checkbox.nextSibling.innerHTML = 'on text'; else checkbox.nextSibling.innerHTML = 'off text'; }
called:
<asp:CheckBox runat="server" ID="chkTest" onclick="changeCheckboxText(this);" />
Just FYI, usually the wrong practice is to change the text of the flag label as it tends to confuse the user.
source share