Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
  <a id="delete-user">Delete User</a>
  
</body>
</html>
 
var d = document.getElementById('delete-user');
d.addEventListener('click', function() {
  warningMsg(
    "Are you sure you want to delete this User? This step can't be undone!",
    '/invoicing/users/',
    '2',
    'delete-user'
  );
});
function warningMsg(warningMsgContent, url, id, actionType){
 alert(url+actionType+"?id="+id);
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers