为什么这次渲染数据不成功...
模板是这样写的,但是除了序号 <%=i+1%>和后面编辑,删除的按钮能出现,其他数据都没有,从后台返回的数据是这样:
{"result":["{\"news_id\":\"1\",\"news_title\":\"\\u6d4b\\u8bd5\",\"news_content\":\"\\u6d4b\\u8bd5\",\"news_from\":\"\\u6d4b\\u8bd5\",\"post_time\":\"2017-02-09 16:34:30\",\"news_type\":\"\\u672c\\u5730\"}","{\"news_id\":\"2\",\"news_title\":\"\\u6d4b\\u8bd52\",\"news_content\":\"\\u6d4b\\u8bd52\",\"news_from\":\"\\u6d4b\\u8bd52\",\"post_time\":\"2017-01-08 16:34:30\",\"news_type\":\"\\u5a31\\u4e50\"}","{\"news_id\":\"4\",\"news_title\":\"\\u6d4b\\u8bd5\\u6807\\u9898\",\"news_content\":\"\\u6d4b\\u8bd5\\u5185\\u5bb9\",\"news_from\":\"CCTV\",\"post_time\":\"2017-02-10 16:30:11\",\"news_type\":\"\\u5a31\\u4e50\"}","{\"news_id\":\"5\",\"news_title\":\"\\u6d4b\\u8bd5\\u6807\\u9898\",\"news_content\":\"\\u6d4b\\u8bd5\\u5185\\u5bb9\",\"news_from\":\"CCTV\",\"post_time\":\"2017-02-10 16:31:58\",\"news_type\":\"\\u5a31\\u4e50\"}","{\"news_id\":\"6\",\"news_title\":\"\\u8bf7\\u95ee\\u800c\\u53c8\\u8270\\u82e6\",\"news_content\":\"\\u8bf7\\u95ee\\u800c\\u53c8\\u8270\\u82e6\\u554a\\u5dcd\\u5ce8\",\"news_from\":\"ASDFG \",\"post_time\":\"2017-02-10 16:33:09\",\"news_type\":\"\\u5a31\\u4e50\"}","{\"news_id\":\"7\",\"news_title\":\"\\u6c83\\u5c14\\u7279\\u4e0ei\",\"news_content\":\"\\u6c83\\u5c14\\u7279\\u4e0eiw\",\"news_from\":\"\\u54e6\",\"post_time\":\"2017-02-10 16:33:58\",\"news_type\":\"\\u7cbe\\u9009\"}","{\"news_id\":\"8\",\"news_title\":\"asdasdasa\",\"news_content\":\"\\u963f\\u65af\\u8fbe\",\"news_from\":\"\\u963f\\u65af\\u5927\\u65f6\\u4ee3\",\"post_time\":\"2017-02-10 17:15:59\",\"news_type\":\"\\u672c\\u5730\"}","{\"news_id\":\"9\",\"news_title\":\"asdasdasa\",\"news_content\":\"\\u963f\\u65af\\u8fbe\",\"news_from\":\"\\u963f\\u65af\\u5927\\u65f6\\u4ee3\",\"post_time\":\"2017-02-10 17:16:16\",\"news_type\":\"\\u672c\\u5730\"}","{\"news_id\":\"10\",\"news_title\":\"\\u963f\\u65af\\u8fbe\\u5927\\u963f\\u65af\\u8fbe\\u5927\",\"news_content\":\"\\u963f\\u65af\\u8fbe\\u5927\",\"news_from\":\"\\u963f\\u65af\\u8fbe\\u5927\",\"post_time\":\"2017-02-10 17:17:16\",\"news_type\":\"\\u672c\\u5730\"}","{\"news_id\":\"11\",\"news_title\":\"\\u524d\\u96fe\\u706f\\u9a71\\u52a8\\u5668\",\"news_content\":\"\\u524d\\u96fe\\u706f\\u53bb\\u7684\",\"news_from\":\"\\u524d\\u96fe\\u706f\\u53bb\",\"post_time\":\"2017-02-10 17:18:11\",\"news_type\":\"\\u5a31\\u4e50\"}"]}
___________________________________________________________________-模板是这样写的
<% for(var i =0;i<result.length;i++){%>
        <tr>
            <td><%=i+1%></td>
            <td><%=result[i].news_title%></td>
            <td><%=result[i].news_content %></td>
            <td><%=result[i].news_from %></td>
            <td><%=result[i].post_time %></td>
            <td><%=result[i].news_type %></td>
            <td>
                <button class="btn btn-success btn-xs">编辑</button>
                <button class="btn btn-danger btn-xs">删除</button>
            </td>
        </tr>
    <% }%>