How can I select an element by name with jQuery?
You can use the jQuery attribute selector:
$('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'
Any attribute can be selected using [attribute_name=value]
way.
See the sample here:
var value = $("[name='nameofobject']");