x
 
<!DOCTYPE html>
<html>
<script src="https://cdn.staticfile.net/angular.js/1.6.9/angular.min.js"></script>
<body ng-app="">
<div ng-mouseup="count = count + 1" ng-init="count=0">点击我!</div>
<h1>{{count}}</h1>
<p>此例中,每次在 DIV 元素上完成鼠标点击时,变量“count”的值都会增加。</p>
</body>
</html>