开发者

How to get TD value using jquery

开发者 https://www.devze.com 2023-03-25 09:01 出处:网络
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 &

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!!!


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');

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号