javascript 从applet 取值问题请教
执行applet,包括以下代码:TO中:
private EEPTempData rfIDData = null;
public EEPTempData getRfIDData() {
return rfIDData;
}
public void setRfIDData(EEPTempData rfIDData) {
this.rfIDData = rfIDData;
}
private EEPTempEndorsementData rfIDEndorsementData[] = null;
public EEPTempEndorsementData[] getRfIDEndorsementData() {
return rfIDEndorsementData;
}
public void setRfIDEndorsementData(EEPTempEndorsementData rfIDEndorsementData[]) {
this.rfIDEndorsementData = rfIDEndorsementData;
}
run 方法中:
EEPTempData tempData = new EEPTempData();
tempData.setNatCd("CHN");
this.applet.setRfIDData(tempData);
EEPTempEndorsementData tempEndosements[] = new EEPTempEndorsementData[2];
EEPTempEndorsementData endorsementData1 = new EEPTempEndorsementData();
EEPTempEndorsementData endorsementData2 = new EEPTempEndorsementData();
endorsementData1.setNatCd("CHN");
endorsementData2.setNatCd("CHN");
tempEndosements[0] = endorsementData1;
tempEndosements[1] = endorsementData2;
this.applet.setRfIDEndorsementData(tempEndosements);
在jsp页面通过javascrit 取值:
可以取到单个实例的值:
alert(document.applets['EEPOCRApplet'].getRfIDData().getNatCd()); 显示 CHN
但是取不到实例数组的值:
document.applets['EEPOCRApplet'].getRfIDEndorsementData()[0] 出错。
alert(typeof(document.applets['EEPOCRApplet'].getRfIDEndorsementData())); 显示 unknown
请大虾们帮帮忙,谢谢