本文实例讲述了angularjs实现table表格td单元格单击变输入框/可编辑状态。分享给大家供大家参考,具体如下:
html部分:
<table> <thead> <tr > <th width="40px;">序号</th> <th>班次</th> <th>分组</th> <th>操作</th> </tr> </thead> <tbody> <tr ng-repeat="value in train_list" > <td width="40px;">{{value.id }}</td> <td>{{value.trainNumber}}</td> <td ng-click="edit($event)">{{value.groupId}}</td> <td> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" ng-click="move($event,'up')">上移</a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" ng-click="move($event,'down')">下移</a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" ng-click="del($event)">删除</a> </td> </tr> </tbody></table>js部分:
更多关于AngularJS相关内容感兴趣的读者可查看本站专题:《AngularJS指令操作技巧总结》、《AngularJS入门与进阶教程》及《AngularJS MVC架构总结》
希望本文所述对大家AngularJS程序设计有所帮助。