for(var index=1;index<7;index++){ $scope["model_"+index] = index } //效果 = $scope.model_1 = 1 $scope.model_2 = 2 $scope.model_3 = 3 $scope.model_4 = 4 $scope.model_5 = 5 $scope.model_6 = 6 $scope.model_7 = 7