当您输入信用卡号码时,会弹出信用卡徽标。我想在没有点击按钮的情况下在表单中显示更改,而不是徽标。表格在填写输入字段后自动检测更改。
答案 0 :(得分:0)
简单示例:
在Angularjs
$scope.changeStyle=function(){
$scope.color="red";
}
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" ng-model="someName" ng-change="changeStyle()" id="exampleInputEmail1" ng-style="{'color':color}"
placeholder="Email">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>