1、定義一個數組,存放表格數據(注:表格要給定一個高度,添加數據超過這個高度會自動出現滾動條)
ttable:[],
2、把數組中表格的每一行定義成一個對象,添加到數組中
newconditions:function(){
var newValue = {};
//添加新的行數
this.ttable.push(newValue);
},
3、刪除對象
remove:function(index,row){//刪除行數
this.ttable.splice(index, 1)
},