how to print the value of variable in jquery for loop
<pre><code>$(document).ready(function(){
  $('#show').click(function(){
    var totrows= $('#table').attr('rows').length;
    for(i=0; i &lt; totrows; i++){
      //var rowid = $('#table').$(this).attr('i'); 
      alert(rowid);
    }
  });
});
</code></pre>

<p>In The  above function when we click on hyperlink "Show" we are getting the number of rows from the "table1".I want to add the Value of 'i' to the table so that it becomes "table1""table2""table3""table4""table5".The commented line is giving me error</p>
