check:function(mode)
{
var mode = mode || 'on';
return this.each(function(){
switch(mode){
case 'on':
this.checked=true;
break;
case 'off':
this.checked=false;
break;
case 'toggle':
this.checked=!this.checked;
break;
}
});
}
});
这个是全选和取消全选的方法.调用方法: $("input[@type='checkbox']").check('toggle');
附录:
CSS编写软件:TopStyle
JavaScript:调试器:FireFox的venkman