How to get TD value using jquery
I am trying to get the TD value using Value attribute....
Suppose i have fallowing html mark-up
<td nowrap="nowrap" value="FO2180TL" class="colPadding" id="salesOrderNumber1">bla bla <td>
then i tried this-
var soNum = $('#salesOrderNumber1').val()
Which should return me FO2180TL
but it didn't.
How Can i get 开发者_如何学编程that TD value...
Try this
$('#salesOrderNumber1').attr("value");
i think you should use
$('#salesOrderNumber1').attr('value');
instead
jquery selectors
Jquery ref selector
You can get it by $('#salesOrderNumber1').attr('value');
精彩评论