RedBlueGreen提交varapp=angular.module('fromApp',[]);app.controller('formController',function($scope){$scope.fromData={};$scope.check=function(){}});如何实现点击提交当checkbox选中超过2个做出提示即可
2 回答
至尊宝的传说
TA贡献1789条经验 获得超10个赞
form和from写的好错乱jsvarapp=angular.module('fromApp',[]);app.controller('formController',function($scope){$scope.fromData={};$scope.check=function(){if($scope.fromData.favoriteColors){varlog=[];angular.forEach($scope.fromData.favoriteColors,function(v){if(v==true)this.push(v);},log);console.log(log.length);//length}}});
添加回答
举报
0/150
提交
取消