【发布时间】:2016-01-19 07:41:38
【问题描述】:
在我的代码中,数据表没有以正确的格式显示。数据显示在数据表中,但表缺少边框。我附上代码和屏幕截图。请找到附件。请帮忙。
代码:-
<div style="width:90%; margin:0 auto;">
<table id="ex">
<thead>
<tr>
<th>Number of accounts</th>
<th>Number of BUs</th>
<th>Total salesop</th>
<th>Number of dormant accounts</th>
</tr>
</thead>
</table>
</div>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" />
<link href="~/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/jquery.multiselect.css" />
<link rel="stylesheet" type="text/css" href="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/assets/style.css" />
<link rel="stylesheet" type="text/css" href="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/assets/prettify.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" type="text/css" media="screen" />
<link href="~/Content/jquery.jqGrid/ui.jqgrid.css" rel="stylesheet" />
<link href="//cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css" rel="stylesheet" />
<link rel="stylesheet" href="~/css/StyleSheet1.css" type="text/css" media="screen" />
<script src="~/Scripts/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<script src="~/Scripts/i18n/grid.locale-en.js"></script>
<script src="~/Scripts/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/src/jquery.multiselect.js"></script>
<script type="text/javascript" src="http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/assets/prettify.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.pack.js"></script>
<script src="//cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>
<script src="~/Scripts/fourth_page.js"></script>
jquery:-
$('#ex').dataTable({
"aaData": data,
"aoColumns": [{ "mData": "FirstNamecount" },
{ "mData": "LastNamecount" },
{ "mData": "Salary" },
{ "mData": "Gendercount" }],
retrieve: true,
"bDestroy": true,
paging: false,
}).fnDestroy();
【问题讨论】:
标签: jquery jquery-ui datatables