当前位置: 代码迷 >> C# >> 请教用js如何来生成一个二维表格
  详细解决方案

请教用js如何来生成一个二维表格

热度:88   发布时间:2016-05-05 04:11:40.0
请问用js怎么来生成一个二维表格?
就是,我现在有这样一个需求
有一Role
数组 [“Examner”,”Invigilator”,”Supervisor”] 和一个Type数组[“Standard”,”Listening”,”Speaking”]还有一个Role 和Type 对应数组[{Role:”Examner”,Type:”Standard”},
{Role:”Examner”,Type:”Listening”}, {Role:”Supervisor”,Type:”Listening”}, {Role:”Supervisor”,Type:”Speaking”},
{Role:”Invigilator”,Type:”Speaking”}]用js 或jquery 生成一个二维表格显示所有role 和 type 关系,[email protected]
如:

Role / Type Standard Listening Speaking
Examner   @                     @
Invigilator                                      @
Supervisor                      @                @

------解决思路----------------------
循环Role 和Type 对应数组,然后分别根据Role 和Type去相应的数据循环取数据
  相关解决方案