如何使用angularjs将表值推送到数组中 [英] How to push table values into an array using angularjs
本文介绍了如何使用angularjs将表值推送到数组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<table border="1" ng-show="sh_tbladd" id="tblord">
<tbody>
<tr ng-repeat="z in abc">
<td style="display:none">{{z.id}}</td>
<td>{{z.name}}</td>
<td>{{z.sal}}</td>
<td>{{z.mnth}}</td>
<td>{{z.sal * z.mnth}}</td>
<td>
<button type="button" ng-click="remove($index)" >Remove</button>
</td>
</tr>
</tbody>
</table>
<input type="button" id="btnsubmit" ng-click="sub()" value="Submit" />
我的尝试:
如何使用angularjs
What I have tried:
how to push this table values into an array on submit button click using angularjs
推荐答案
index将此表值推送到提交按钮上的数组中)& gt;删除& lt; / button& gt;
< / td >
< / tr >
< / tbody >
< / table >
< 输入 type = 按钮 id = btnsubmit ng-click = sub() value = 提交 / >
index)" >Remove</button> </td> </tr> </tbody> </table> <input type="button" id="btnsubmit" ng-click="sub()" value="Submit" />
我的尝试:
如何将这个表值推送到提交按钮上的数组中使用angularjs点击
What I have tried:
how to push this table values into an array on submit button click using angularjs
试试这个
try this
scope.newarray = [];
scope.newarray = [];
这篇关于如何使用angularjs将表值推送到数组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文