一个js问题 跳出js的for循环
怎么跳出js的for循环,其中id的大小不定
function CZY(){
var stringC;
for(var i=1;i<100;i++){
var breaks = document.getElementById("breaks"+i).value;
var s = document.getElementById("statusZY"+i).value;
var casesInfoId = document.getElementById("casesInfoIdzy"+i).value;
var statejbo = document.getElementById("statezyo"+i).value;
var statejbt = document.getElementById("statezyt"+i).value;
var statejbo1 = document.getElementById("statezyo"+i);
var statejbt1 = document.getElementById("statezyt"+i);
if(s==20){
stringC+=s+"@"+casesInfoId+",";
}
if(s==1){
if(statejbo1.checked){
stringC+=statejbo+"@"+casesInfoId+",";
}
if(statejbt1.checked){
stringC+=statejbt+"@"+casesInfoId+",";
}
}
if(stringC=='undefined'){
stringC="";
}
}
stringC=stringC.replace("undefined","");
stringC=stringC.substr(0,stringC.length-1);
ajaxT(stringC);
}
<tr>
<td align="right">审核:</td>
<td colspan="3">
<select id="statusZY<%=ZYo++%>" name="businessState" onchange="statusTFZY(<s:property value="baseCaseInfoID"/>)">
<option value="0">请选择</option>