juicer

    function financingBodyTable(){
        var jsonData = {
            FinancingBodyJSON:${relaListArr}//list数组
        }
        var addModel = $("#trSubject").html();//script 的id
        var j = juicer(addModel,jsonData);
        $("#divSubject").html(j);//加载到divSubject
    }
<div id="divSubject"></div>
<script id="trSubject" type="text/template">
{@each FinancingBodyJSON as json,index}
    <div class="tk-proBox ml20 table-bordered" id='{{json.institutionsId}}' insName='{{json.name}}'>
              {@if {{json.firstIndustryCodeName}} != null}
                   ({{json.firstIndustryCodeName}})--%>
              {@/if}--%>
    </div>
    {@/each}
</script>
引人<%@include file="/framework/include/juicerHead.jsp" %> juicer-min.js
后台要JSONArray.fromObject(FinancingBodyList).toString();
原文地址:https://www.cnblogs.com/gaobing1252/p/8534807.html