我正在使用 SemanticUI 并且 checkall 功能不起作用。这是我的代码
jQuery('.ui.checkbox.selectAll').checkbox( {
onChange: function(){
formObj = this[0].form;
checkall(formObj.SelectAllBox,formObj.UserID);
}
});
我的检查功能是
function checkall(c,t){
for(i=0; i<t.length; i++) t[i].checked=c.checked;
}
HTML 代码
<form name="form1" action="action.cfm" method="post">
<div class="ui checkbox selectAll">
<input type="checkbox" name="SelectAllBox" value="select_all" >
</div>
<div class="ui checkbox">
<input type="checkbox" name="UserID" value="#UserID#">
</div>
</form>
我尝试了许多指导和文档,但没有运气。在此先感谢您的帮助。