<!DOCTYPE html>
<html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
tbody tr:nth-child(even) {
background-color: aqua;
}
tbody tr:nth-child(odd) {
background-color: gold;
}
;
</style>
<script type="text/javascript" src="../js/angular.js"></script>
<script>
var app = angular.module("myapp", []);
app.controller("mycon", function($scope) {
<meta charset="UTF-8">
<title></title>
<style>
tbody tr:nth-child(even) {
background-color: aqua;
}
tbody tr:nth-child(odd) {
background-color: gold;
}
;
</style>
<script type="text/javascript" src="../js/angular.js"></script>
<script>
var app = angular.module("myapp", []);
app.controller("mycon", function($scope) {
$scope.shang = [{
id: 1,
name: "橘子",
shu: 20,
jia: 10,
state: false
}, {
id: 9,
name: "苹果",
shu: 16,
jia: 20,
state: false
}, {
id: 3,
name: "柚子",
shu: 18,
jia: 15,
state: false
}, {
id: 6,
name: "榴莲",
shu: 5,
jia: 98,
state: false
}];
id: 1,
name: "橘子",
shu: 20,
jia: 10,
state: false
}, {
id: 9,
name: "苹果",
shu: 16,
jia: 20,
state: false
}, {
id: 3,
name: "柚子",
shu: 18,
jia: 15,
state: false
}, {
id: 6,
name: "榴莲",
shu: 5,
jia: 98,
state: false
}];
//总计
$scope.zong = function()
$scope.zong = function()