简体   繁体   中英

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...
Thanks in advance!!!

尝试这个

$('#salesOrderNumber1').attr("value");

i think you should use $('#salesOrderNumber1').attr('value'); instead jquery selectors Jquery ref selector

您可以通过$('#salesOrderNumber1').attr('value');获得它$('#salesOrderNumber1').attr('value');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM