以 input 标签为例
Html:
<input id="maxWatchCount" name="maxWatchCount" ng-model="maxWatchCount_v" style="width: 72%;" class=" margin-lf-2" placeholder="请输入观看次数" required="required">
AngularJS:
app.controller('businessCtrl', function($scope, $interval, $http) {
$scope.$watch("maxWatchCount_v", function(n, o) {
//n为当前控件的状态(值),o为当前控件的前一个状态(值)
......
ni de luo ji cao zuo;
ha ha ha;
......
}, true);
});