<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="../kuwenjian/angular.js" ></script>
<script>
var app = angular.module("myapp" , []);
app.controller("mycons", function($scope,$rootScope){
$scope.e="541";
$scope.a="";
});
app.filter("mycx" , function(){
return function(text){
return text.replace(/我/g,"*")
}
});
</script>
</head>
<body ng-app="myapp" ng-controller="mycons">
{{e}}
<input type="text" ng-model="a" />
{{a | mycx}}
</body>
</html>
angular过滤器,找到敏感字变**
最新推荐文章于 2020-02-09 06:19:15 发布