How to retrieve a particular value from a single row table in html by using JQuery -


i wondering how retrieve particular value, in case "2" (from below html code) using jquery. notice code represents single table row (since data-rowindex="0",it represents first table row).

  <tr role="row" class="abc" data-rowindex="0">     <td data-title="car">       <span name="id-car">audi</span>     </td>     <td class="carnumber" data-title="number">        <span name="id-carnum">2</span>     </td>      <td class="carcolor" data-title="color">0</td>      <td class="caryear" data-title="caryear">0</td>   </tr> 

thanks,

the following makes use of row index:

$("tr[data-rowindex=0]>.carnumber>span").text() 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -