如何删除文本框边框颜色单击重置按钮 [英] How to remove textbox border color click on reset button
问题描述
Angularjs如何在点击重置按钮后删除文本框边框颜色。
我使用下面的代码,但是在angularjs中无法删除文本框颜色
$ scope.cancel = function(){
clear();
$ scope.frmCustomerRegistration。$ setPristine();
}
我尝试过:
< form class =form-horizontal custom_formname =frmCustomerRegistrationng-submit =registerCustomer()novalidate>
Angularjs how to remove textbox border color after click on reset button.
I have used below code but textbox color could not be remove in angularjs
$scope.cancel = function () {
clear();
$scope.frmCustomerRegistration.$setPristine();
}
What I have tried:
<form class="form-horizontal custom_form" name="frmCustomerRegistration" ng-submit="registerCustomer()" novalidate>
< input type =textplaceholder =First Nameclass =form-control color_form_controlid =first_namename =first_nameautocomplete =offng-model =FirstName ng-required =true/>
<input type="text" placeholder="First Name" class="form-control color_form_control" id="first_name" name="first_name" autocomplete="off" ng-model="FirstName" ng-required="true" />
< / for m>
</form>
推荐答案
scope.cancel = function(){
clear();
scope.cancel = function () {
clear();
scope.frmCustomerRegistration。
scope.frmCustomerRegistration.
setPristine();
}
我尝试过:
< form class =form-horizontal custom_formname =frmCustomerRegistrationng-submit =registerCustomer() novalidate>
setPristine();
}
What I have tried:
<form class="form-horizontal custom_form" name="frmCustomerRegistration" ng-submit="registerCustomer()" novalidate>
< input type = textplaceholder =First Nameclass =form-control color_form_controlid =first_namename =first_nameautocomplete =offng-model =FirstNameng-required =true/>
<input type="text" placeholder="First Name" class="form-control color_form_control" id="first_name" name="first_name" autocomplete="off" ng-model="FirstName" ng-required="true" />
< / form>
</form>
这篇关于如何删除文本框边框颜色单击重置按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!