代码如下:
<!DOCTYPE html>
<html ng-app="exampleApp">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="active/jquery.min.js"></script>
<script src="active/angular.min.js"></script>
<script>
angular.module("exampleApp",[])
.controller("default",function ($scope) {
$scope.items = [
{name:"zhou",age:25},
{name:"li",age:40},
{name:"zhu",age:27}
];
})
</script>
</head>
<body ng-controller="default">
<table>
<thead><tr><th>#</th><th>姓名</th><th>年龄</th></tr></thead>
<tbody >
<tr ng-repeat="item in items">
<td><input type="checkbox" /></td>
<td>{{item.name}}</td>
<td>{{item.age}}</td>
</tr>
</tbody>
</table>
</body>
</html>
如何得到我已经选择的两行数据
相关分类