标签:数据源
function analysis_table1() { var dataSet=[ [‘1‘,‘大气所‘,‘PM2.5‘,‘区域监点‘], [‘1‘,‘大气所‘,‘PM2.5‘,‘区域监点‘], [‘1‘,‘大气所‘,‘PM2.5‘,‘区域监点‘], [‘1‘,‘大气所‘,‘PM2.5‘,‘区域监点‘], [‘1‘,‘大气所‘,‘PM2.5‘,‘区域监点‘], [‘1‘,‘大气所‘,‘PM2.5‘,‘区域监点‘], [‘1‘,‘大气所‘,‘PM2.5‘,‘区域监点‘] ] var t = $(‘#Deployment_point_datatables1bottom‘).DataTable( { "bAutoWidth":false, "processing": true, "bProcessing": true, "searching":false, "oLanguage" :{ "sLengthMenu": "每页显示 _MENU_ 条", "sZeroRecords": "抱歉, 没有找到", "sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据", "sInfoEmpty": "没有数据", "sInfoFiltered": "(从 _MAX_ 条数据中检索)", "sZeroRecords": "没有检索到数据", "sSearch": "搜索", "oPaginate": { "sFirst": "首页", "sPrevious": "前一页", "sNext": "后一页", "sLast": "尾页" } }, "scrollY": "300px", "scrollCollapse": "true", "paging": "false", "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], "data": dataSet, "columns": [ { "title": "排名" }, { "title": "名称" }, { "title": "PM2.5" }, { "title": "POI" } ] } ); }
通过数组的push,这样就可以自定义后台传来的值了,是不是很棒?
标签:数据源
原文地址:http://10917806.blog.51cto.com/10907806/1750000