The above button was created using :
<button type="button" id="eventButton">Button for event</button>

In order to excute the eventFunction mentioned below Kindly click the button
var eventButton = document.getElementById("eventButton");
var eventFunction = (event) =>{
//You can edit this code by clicking here
alert("event triggered from Button")
}
eventButton.addEventListener("
", eventFunction);
The above input box was created using :
<input type="text" id="eventInputBox">

In order to excute the eventInputFunction mentioned below Kindly click the Input Box
var eventInputBox = document.getElementById("eventInputBox");
var eventInputFunction = (event) =>{
//You can edit this code by clicking here
alert("event triggered from Input Box")
}
eventInputBox.addEventListener("
", eventInputFunction);