get name jquery code example

Example 1: jquery get value by name

$("input[name=nameGoesHere]").val();

Example 2: get name jquery

$('#yourid').attr('name')

Example 3: get element by name in jquery

$('td[name ="tcol1"]')

Example 4: get a element using name in jquery

$('td[name ="tcol1"]')   // matches exactly 'tcol1'
$('td[name^="tcol"]' )   // matches those that begin with 'tcol'
$('td[name$="tcol"]' )   // matches those that end with 'tcol'
$('td[name*="tcol"]' )   // matches those that contain 'tcol'

Example 5: jquery get name attribute

$( "input[name='Hot Fuzz']" );

Tags:

Misc Example