$(document).ready(function() { $( "form" ).submit(function () { // Get the submit button element var btn = $(this).find("input[type=submit]:focus" ); }); }