本文介绍了更改复选框类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我是jquery的初学者。请帮助我。 我有复选框I am beginner in jquery. please help me in that.I have checkbox<div class="small-12 large-5 columns"> <label for="checkbox1"> <asp:CheckBox runat="server" ID="chkRemember" /> <span class="custom checkbox "></span>Remember My password </label> </div> 我想将跨度的类更改为custom che ckbox检查选中复选框时。并在未选中时将其更改为自定义复选框已禁用。在jqueryI want to change the class of the span to "custom checkbox checked" when the checkbox checked. and change it to "custom checkbox disabled" when it is not checked. in jquery推荐答案<div class="small-12 large-5 columns"> <label for="checkbox1"> <asp:checkbox runat="server" id="chkRemember" onclick="MyCheckedChanged(this)" xmlns:asp="#unknown" /> <span id="spnChk" class="custom checkbox"></span>Remember My password </label> </div> JavaScript:JavaScript:function MyCheckedChanged(checkbox) { if (checkbox.checked) { 这篇关于更改复选框类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-12 10:09