html - how to get a td value of a table using javascript -
i have aspx file has html below:
i want value 37.23961( seen above).
how value ( td iindex 6 of table 'gridview2) using javascript ?
myhtml:
<table rules="all" id="gridview2" style="width:542px;border-collapse:collapse;" border="1" cellspacing="0"> <tbody> <tr> <th scope="col">hname</th> <th scope="col">haddress</th> <th scope="col">hphone</th> <th scope="col">hhours</th> <th scope="col">hrating</th> <th scope="col">hlat</th> <th scope="col">hlong</th> </tr> <tr> <td>kaiser permanante</td> <td>200 fremont boulevard</td> <td>5105199000</td> <td>mon-fri : 8:00 - 11:00 pm, sat, sun: 10:00 am- 6:00pm</td> <td>3</td> <td>37.23961</td> <td>-121.800278</td> </tr> </tbody> </table>
check code using jquery.if possible provide jsfiddle.
$('#gridview2').find('td:eq(6)').html();
Comments
Post a Comment