js接收后台List的方法+
使用的是ssh框架,在后台action中通过List<Wtdnr>queryewtdm=jzxbdservice.queryEwtdM1(wtdnr);获取List值现在...
使用的是ssh框架,在后台action中通过
List<Wtdnr> queryewtdm=jzxbdservice.queryEwtdM1(wtdnr);获取List值
现在需要在jsp页面中的js获取这个List值进行循环显示
js的函数数据如下面(想用List值替代这个data值)
function(data)
{
var cntrtableStr = " ";
if(data != null)
{
for(var i=0; i<data.length; i++)
{
cntrtableStr=cntrtableStr+"<br/> <div style='page-break-after:always;' ></div>";
cntrtableStr = cntrtableStr +
" <div >"+
" <div align='center' ><font style='font-weight: bolder;font-size: 22px;' >******司</font></div>"+
" <div align='center' ><font style='font-weight: bolder;font-size: 18px;' >****证</font></div>"+
" <div align='center' > </div>"+
" <div align='center' > </div>"+
" <table border='0' align='center' cellpadding='0' cellspacing='0' style='width:100%;border-color: black;font-size: 16px;line-height:30px;'> "+
" <tr> "+
" <td colspan='2'> </td> "+
" <td colspan='13'><div name='barcode1'>"+judgeNull(data[i].contractno)+judgeNull(data[i].seqno)+"</div></td> "+
" </tr> "+
" <tr> "+
" <td style='width: 85px;' >单据编号:"+
" <td > "+judgeNull(data[i].contractno)+judgeNull(data[i].seqno)+" </td> "+ 展开
List<Wtdnr> queryewtdm=jzxbdservice.queryEwtdM1(wtdnr);获取List值
现在需要在jsp页面中的js获取这个List值进行循环显示
js的函数数据如下面(想用List值替代这个data值)
function(data)
{
var cntrtableStr = " ";
if(data != null)
{
for(var i=0; i<data.length; i++)
{
cntrtableStr=cntrtableStr+"<br/> <div style='page-break-after:always;' ></div>";
cntrtableStr = cntrtableStr +
" <div >"+
" <div align='center' ><font style='font-weight: bolder;font-size: 22px;' >******司</font></div>"+
" <div align='center' ><font style='font-weight: bolder;font-size: 18px;' >****证</font></div>"+
" <div align='center' > </div>"+
" <div align='center' > </div>"+
" <table border='0' align='center' cellpadding='0' cellspacing='0' style='width:100%;border-color: black;font-size: 16px;line-height:30px;'> "+
" <tr> "+
" <td colspan='2'> </td> "+
" <td colspan='13'><div name='barcode1'>"+judgeNull(data[i].contractno)+judgeNull(data[i].seqno)+"</div></td> "+
" </tr> "+
" <tr> "+
" <td style='width: 85px;' >单据编号:"+
" <td > "+judgeNull(data[i].contractno)+judgeNull(data[i].seqno)+" </td> "+ 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询