angularjs表格方式显示数据
2024-10-15 10:07:49
<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table> <table class="table table-striped">
<thead><tr>
<th>Edit</th>
<th>First Name</th>
<th>Last Name</th>
</tr></thead>
<tbody><tr ng-repeat="user in users">
<td>
<button class="btn" ng-click="editUser(user.id)">
<span class="glyphicon glyphicon-pencil"></span> Edit
</button>
</td>
<td>{{ user.fName }}</td>
<td>{{ user.lName }}</td>
</tr></tbody>
</table>
<style> table, th , td { border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
最新文章
- Microsoft.Office.Interop.Excel的用法以及利用Microsoft.Office.Interop.Excel将web页面转成PDF
- C#中的线程四(System.Threading.Thread)
- 用开源Look&;Feel (Substance)写 漂亮的Swing应用程序
- C++ 拆分字符串-copy()
- string为什么可以写入共享内存
- 服务器端启动soket多线程
- Linux下fork()、vfork()、clone()和exec()的区别
- poj 1704 Georgia and Bob(阶梯博弈)
- 加密传输SSL协议6_验证公钥
- 转:JAVA里面的int类型 和Integer类型,有什么不一样
- 记录一个使用HttpClient过程中的一个bug
- 2017UGUI之slider
- Calico搭建配置
- 『TensorFlow』读书笔记_Inception_V3_上
- IN_ORDER_PLANNING、IN_BOM_CHANGE
- 润乾报表如何使用Echarts
- Solr学习之三 solr配置说明之一
- 利用sklearn的LabelEncoder对标签进行数字化编码
- 更新字典 (Updating a Dictionary,UVa12504)
- 设计模式-适配器模式(Adapter Pattern)