String mny = ""; String mnyName =""; for(int m = 0;m<amnyList.length;m++){ mny += "'"+amnyList[m].getMny()+"'"; mnyName += "'"+amnyList[m].getMnyName()+"'"; if(m<amnyList.length-1){ mny += ","; mnyName += ","; } }
?上述是jsp中对返回值进行处理
?
? 下面是在js中使用这些变量
?
?
function getMnyName(mny){ var bz = new Array(<%=mny%>); var bzName = new Array(<%=mnyName%>); for(m = 0 ; m <bz.length; m++){ if(mny == bz[m]){ return bzName[m]; }else{ continue; } } }
?
?