如何将 JSON 数据放入 html/javascript 网格表中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13012390/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to put JSON data in html / javascript grid table
提问by mcknight
I have the following JSON-formatted data:
我有以下 JSON 格式的数据:
[
{
"ID": "00:50:c2:63:10:1a",
"start": "1349773838277760",
"end": "1349773838277770",
"startArea": "areaStart",
"endArea": "areaEnd",
"duration": "10"
},
{
"ID": "00:50:c2:63:10:1a",
"start": "1349773838277760",
"end": "1349773838277780",
"startArea": "areaStart",
"endArea": "areaEnd",
"duration": "20"
},
{
"ID": "00:50:c2:63:10:1a",
"start": "1349773838277760",
"end": "1349773838277780",
"startArea": "areaStart",
"endArea": "areaEnd",
"duration": "20"
}]
How can I display this data nicely in a html data table?
如何在 html 数据表中很好地显示这些数据?
Is there a plugin for jQuery that can help me?
是否有 jQuery 插件可以帮助我?
My basic approach is this:
我的基本方法是这样的:
采纳答案by Michael Meier
Have a look at:
看一下:
http://www.1stwebdesigner.com/css/top-jquery-chart-libraries-interactive-charts/
http://www.1stwebdesigner.com/css/top-jquery-chart-libraries-interactive-charts/
http://codecanyon.net/item/graphup-jquery-plugin/108025?ref=1stwebdesigner
http://codecanyon.net/item/graphup-jquery-plugin/108025?ref=1stwebdesigner
These are solutions that are very good for these kinds of tables
这些是非常适合这类表的解决方案
回答by Andy
I would recommend dataTables, you can feed in a javascript array. Click here
我会推荐 dataTables,你可以输入一个 javascript 数组。点击这里
回答by PKeidel
DataTablescan create a table from JSON.
DataTables可以从 JSON 创建一个表。