controller @ get mapping (/edit/{ id } ) public string edit (path variable ) Long id,ModelMap mmap ) listes test map.put (' ) 返回前缀'/edit '; } edit.html [[${TestList}]]检索从控制器传递的testList对象。 此功能为查询的testList集合中的所有test对象提供value值的累积,并将最后一个累积值授予input。
. input name=' total value ' value='0' style=' border-width :0; color:red;' class=' form-control ' type=' text ' maxlength=' 30 ' readonly=' readonly ' . (vartotalamounly ) I [ [ $ {测试列表} ] ].length; I ) { var result=[ [ $ {测试列表} ] ] [ I ]; 总计数=accadd (总计数,result.value; }$(input[name='totalvalue ).val ) totalamount; } ……