从一个json开始,我想得到一组卡片或div,里面有json数据,如下表所示。不使用React库或Angular框架的最佳解决方案是什么
var `dataSet = [`
`['Shou Itou', 'Regional Marketing', 'Tokyo', '8899', '2011/08/14', '$163,000'],`
`['Michelle House', 'Integration Specialist', 'Sydney', '2769', '2011/06/02', '$95,400'],`
`['Suki Burks', 'Developer', 'London', '6832', '2009/10/22', '$114,500'],`
`['Prescott Bartlett', 'Technical Author', 'London', '3606', '2011/05/07', '$145,000'],`
`['Gavin Cortez', 'Team Leader', 'San Francisco', '2860', '2008/10/26', '$235,500'],`
`['Martena Mccray', 'Post-Sales support', 'Edinburgh', '8240', '2011/03/09', '$324,050'],`
`['Unity Butler', 'Marketing Designer', 'San Francisco', '5384', '2009/12/09', '$85,675'],`
\];
$(document).ready(`function` `() {`
`$('#example').DataTable({`
`data: dataSet,`
`columns: [`
`{ title: 'Name'` `},`
`{ title: 'Position'` `},`
`{ title: 'Office'` `},`
`{ title: 'Extn.'` `},`
`{ title: 'Start date'` `},`
`{ title: 'Salary'` `},`
`],`
`});`
});
这就是我希望通过
中的数据实现的目标
1条答案
按热度按时间hgb9j2n61#
**这可能是一个解决方案。**我希望能帮助你。上面你是用jquery
}