Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/423.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过javascript创建表_Javascript_Jquery_Html_Angularjs - Fatal编程技术网

通过javascript创建表

通过javascript创建表,javascript,jquery,html,angularjs,Javascript,Jquery,Html,Angularjs,目前,我正在通过HTML创建一个表,如下所示:- 
 
 
 室
 委员会ID
 名称
 家长委员会
 联络处
 
 
 

 
 {{用户委员会{会议厅}
 {{user.committee_id}
 {{user.committee_name}
 {{user.committee\u parent\u id}
 {{user.committee_contact}
 {{用户委员会办公室}
 
 
 
 角度的方法不是设置innerHTML值之类的操作。您可以使用UI

目前,我正在通过HTML创建一个表,如下所示:-







室
    委员会ID
    名称
    家长委员会
    联络处










{{用户委员会{会议厅}

{{user.committee_id}

{{user.committee_name}

{{user.committee\u parent\u id}

{{user.committee_contact}

{{用户委员会办公室}








角度的方法不是设置innerHTML值之类的操作。您可以使用UI路由器为视图创建模板(如上所示的HTML)

下面的代码假设您已将模板加载到myTemplate中

// create a module
export default angular.module(name, [
  angularMeteor
  ,uiRouter
  ,Amba
]).component(name, {
  template: myTemplate,
  controller: Diags
})
  .config(config)
  .run(run);
如果要将模板保存在单独的文件中,也可以使用templateUrl
函数tableCreate(){
var body=document.body,
tbl=document.createElement('table');
tbl.style.width='100px';
tbl.style.border='1px纯黑';
对于(变量i=0;i<3;i++){
var tr=tbl.insertRow();
对于(var j=0;j<2;j++){
如果(i==2&&j==1){
打破
}否则{
var td=tr.insertCell();
td.appendChild(document.createTextNode('Cell'));
td.style.border='1px纯黑';
如果(i==1&&j==1){
td.setAttribute('rowSpan','2');
}
}
}
}
附肢儿童(tbl);
}

tableCreate()但是分页和分页控件呢。我必须把它们放在哪里?