onclick Event jquery

JavaScript
$( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});$('#selector').on('click',function(){
    //Your code here
});                  $( "#dataTable tbody tr" ).on( "click", function() {
  console.log( $( this ).text() );
});
$(elem).click(myFunc());$('a').click(function(){
$.ajax({
type: "POST",
url: "mysimplepage.php",
async: true,
data: { logDownload: true, file: $(this).attr("name") }
});
return false;
});
// Html
<input type="text" onchange="MyFuction(this)" />
  
// Js  
function MyFunction(item) {
  var input = $(item);
  console.log(input);
}
Source

Also in JavaScript: