Change background colour of button when clicked

后端 未结 4 1617

I would like to change the background colour of a button when it is clicked

HTML code:

4条回答
  •  灰色年华
    2021-01-24 19:01

    You can prepare css class:

    .clicked 
    {
    color:red;
    }
    

    HTML:

        

    and give a class name in click function:

    $scope.buttonClick= function (s){$scope.selectedButton =s }
    

    http://jsfiddle.net/ms403Ly8/38/

提交回复
热议问题