function batchdel() {//
var chk_value =[];
$("input[name="ids"]:checked").each(function(){
chk_value.push($(this).val());
});
if (chk_value.length==0) {
alert("");
return false;
}
if (chk_value.length > 0) {
var msg = "" + chk_value + "";
if (confirm(msg) == true) {
location.href = "<%=basePath%>user/batchDelete?chk_value=" + chk_value;
return true;
} else {
return false;
}
}
}
var checkedIds=""; //id
function changeIds(){
var oneches=document.getElementsByName("ids");
for(var i=0;i<oneches.length;iPP){
if(oneches[i].checked==true){
if(!contains(checkedIds,oneches[i].value)){
checkedIds+=oneches[i].value+",";
}
}
if(oneches[i].checked==false){
if(contains(checkedIds,oneches[i].value)){
checkedIds=checkedIds.replace((oneches[i].value+","),"");
}
}
}
}
function getChecked(){
if(checkedIds==""){
return;
}
var oneches=document.getElementsByName("ids");
for(var i=0;i<oneches.length;iPP){
if(contains(checkedIds,oneches[i].value)){
oneches[i].checked="checked";
}
}
}
function contains(obj, ele) {
if(obj==""){
return;
}
var arr = obj.split(",");
var i = arr.length;
while (i--) {
if (arr[i] == ele) {
return true;
}
}
return false;
}
<a href="list?pageIndex=${pageUtil.pageIndex<pageUtil.pageCount?pageUtil.pageIndex+1:pageUtil.pageCount}" class="next" onclick="changeIds();getChecked();contains(this,obj,ele);"></a>