<html>
<script src="https://cdn.staticfile.net/angular.js/1.6.9/angular.min.js"></script>
<body ng-app="">
<div ng-mouseenter="count = count + 1" ng-init="count=0">将鼠标悬停在我上面!</div>
<h1>{{count}}</h1>
<p>此例中,每次鼠标光标进入 DIV 元素时,变量“count”的值都会增加。</p>
</body>
</html>