document.getElementById( "elementId" ); or $( "#elementId" );
$('#element') is derived from query selector as doxument.querySelector('#element') define in jquery library. Here u can use both id/name but only with the help of jquery library where as document.getElementById('elementId') is only with I'd of the element only and it runs in native without help any library.