AngularJS Example:

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<div ng-app>
  <div ng-controller="testCtrl">
       <button class="btn btn-sm btn-danger"  ng-click="removeUser(1)">del</button>
    </div>
</div>

CSS

.clicked 
{
background-color:red;
}

JavaScript

function testCtrl($scope) {
    $scope.removeUser= function (s){
     if (confirm("Are you sure?")) {
        alert("deleted"+ s);
    }
    
     }
  }