eg:
//是否选中了记录
var billId = "";
var oldbill = "";
var groupId = "";
var ruzBillRoomNo = "";
var ruzBillRoomId = "";
var selectObj = "";
var isChoose = false;
function checkbox(){
var str=document.getElementsByName("box");
var objarray=str.length;
var chestr="";
for (i=0;i<objarray;i++){
if(str[i].checked == true){
chestr+=str[i].value;
selectObj = str[i];
}
}
if(chestr == "" || chestr.length > 150){
alert("请先选择一条记录!");
isChoose = false;
}else{
//alert("复选框的值是:"+chestr);
var data = chestr.split(",");
billId = data[0];
oldbill = data[1];
groupId = data[2];
ruzBillRoomId = data[3];
ruzBillRoomNo = data[4];
isChoose = true;
}
}