现在的位置: 首页 > 综合 > 正文

operamasks js 接收 controller 非格式化值

2019年06月03日 ⁄ 综合 ⁄ 共 384字 ⁄ 字号 评论关闭

1、现象

       operamasks为前台界面,封装及其好,只接收后台固定格式数据,且请求都在JS文件中。

2、问题

      controller无法给出js规定的格式数据,又必须传输。

3、解决

      采用jsp中转:controller====>jsp=====>js

      jsp中

     <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

    <div id="jspButtonList" style="display:none;">
       <c:forEach items="${jspButtonList}" var="p">
            ${p.btnId},
       </c:forEach>
    </div>

    js中

    $("#jspButtonList").text()

抱歉!评论已关闭.