How part of the background data extracted from the list into the array in the jsp

<script type="text/javascript">
    var tbdwIds = new Array();
    var pfxIds = new Array();

    // 初始化,将bmxx.tbdwid存入数组
    <c:forEach items="${bmxxList}" var="bmxx">
        tbdwIds.push('${bmxx.tbdwid}'); //js中可以使用此标签,将EL表达式中的值push到数组中
    </c:forEach>

    // 初始化,将pfx.id存入数组
    <c:forEach items="${pfxList}" var="pfx">
        pfxIds.push('${pfx.id}'); //js中可以使用此标签,将EL表达式中的值push到数组中
    </c:forEach>
</script>

 

Published 47 original articles · won praise 16 · views 70000 +

Guess you like

Origin blog.csdn.net/zorro_jin/article/details/82530142