//全选和全不选 vote
function selectAll(){
if($(“:checkbox”).prop(‘checked’)){
//$(“:checkbox”).removeAttr(‘checked’);//attr不兼容了jquery1.6以上
$(“:checkbox”).prop(‘checked’,false);
}else{
$(“:checkbox”).prop(‘checked’,true);
}
}
//删除选中的选项
function delselect(url,says){
if(confirm(says)){
if($(“:checkbox”).prop(‘checked’)){//排出无选则的情况
var s=”;
var urls=”;
$(“:checked”).each(function(i){//遍历已经选中的值,并且做连接处理。
s+=$(this).val()+’,’;
});
urls=url+s;
window.location.href=urls;
return true;
}
else{
alert(‘no checked find!’);return false;
}
}
else{
return false;
}
}