javascript - reading table row but each <td> separately? -


<div id='c1'> </div>  function() { $('#c1').append('<table ><tr><td id=v>'abc'</td> <td>'12'</td><td>'1'</td> <td>77 </td><td><span class=c>x</span></td></tr></table>'); } function test()     {     for(i=0;i<6;i++){     var s=document.getelementbyid('c1').getelementsbytagname('tr','td')[i].innerhtml;//       line give output =abc 121 77     var t=document.getelementbyid('v')[i].innerhtml;//not working     alert(t);      //this t setting in session using ajax      } 

i want <tr>data each <td> separately.is possible take each <td> data separately? while getting session,got (abc 121 77 x) on page how retrieve each <td> separate in java?

use jquery "each" function (link).

$('tr').each(function() {     alert($(this).html()); }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -