Lightning Button Action Usage:

Buttons are common user input in lightning and any html page
Button can be associated with click, hover and many other events in html


Usage of Button events in lightning

<lightning:button name="" label="" aura:id onclick="{!c.functionName}"
name="button name for js access, its a good practise to have name and id as the same value
Aura:id ="unique id to access the dom element in js"
label ="Name that appears on screen in browser"
onclick = event name
Notice the value for onclick ="{!c.functionName}" , a function with functionName must be declared in js controller
The above line wires and links the function to the onclick event of button
Any click to the button will call this method

The following program is a demo of attribute usage in lightning
component:

Create a lightning component with the below markup code
Name the component as HelloWorldWithButtonAction_Cmp or any name you like

<aura:component >
		<lightning:button label = "Click Me" onclick = "{!c.handleClick}" />

</aura:component>
Component Js Code :
({
	handleClick : function(component, event, helper) {
		alert("hello buddy, you have clicked the button");
	}
})

Below is the hello world App code:
<!--


 * created by 		:		Shiva RV
 * Date				:		13-10-2018
 * Description		:		Hello World Lighting App
  
-->

<aura:application extends="force:slds">
<!--this is the lightning app where you can place html codes , associate js code
		also can embed lightning component to it -->
  
    <!-- how to add component in class -->
  <!--  <c:HelloWorldWithButtonAction_Cmp></c:HelloWorldWithButtonAction_Cmp>  -->
</aura:application>

<c:ComponentName> </c:ComponentName> (Use HelloWorldWithButtonAction_Cmp or the Component name you just created)

Output:

Key Notes :
*Click the button to invoke the js function associated to it
*A button can be associated to more than one events like onhover,onclick etc