javascript events list with examples

JavaScript
//this is an event detector for a mouseclick with Jquery
$('#id').on('click',function(){
    yourFunction(args);
});function fun2 (myElement){
    myElement.style.backgroundColor="#ccc";
}
Source

Also in JavaScript: