function showProjname(){
var yearId=window.form.replyYear.options[form.replyYear.selectedIndex].value;
var num=0;
var result=new Array()
<%
List projList=(List)request.getAttribute("projList");
for(int i=0;i<projList.size();i++) {
ProjSheetVO vo2=(ProjSheetVO)projList.get(i);
%>
if(<%=vo2.getReplyYear()%>==yearId){
result[num]=new Array('<%=vo2.get你的东西%>','<%=vo2.get你的东西%>')
num++;
此处相把满足条件的记录存在数组中,在下面的document.all["projSheetId"]处输出(如何实现?????)
<%}%>
document.all["projSheetId"].options.length = num+1;
alert(num);
<% for(int j=1;j<=num;j++) {%>
document.all["projSheetId"].options[j]=new Option(result[j][0],result[j][1]);
<%}%>
}
</script>
var yearId=window.form.replyYear.options[form.replyYear.selectedIndex].value;
var num=0;
var result=new Array()
<%
List projList=(List)request.getAttribute("projList");
for(int i=0;i<projList.size();i++) {
ProjSheetVO vo2=(ProjSheetVO)projList.get(i);
%>
if(<%=vo2.getReplyYear()%>==yearId){
result[num]=new Array('<%=vo2.get你的东西%>','<%=vo2.get你的东西%>')
num++;
此处相把满足条件的记录存在数组中,在下面的document.all["projSheetId"]处输出(如何实现?????)
<%}%>
document.all["projSheetId"].options.length = num+1;
alert(num);
<% for(int j=1;j<=num;j++) {%>
document.all["projSheetId"].options[j]=new Option(result[j][0],result[j][1]);
<%}%>
}
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货