How to get the whole HTML table values on a click
<p>Here I am getting the table single tr values in the click of that tr . What I need is to get the whole table tr values in a single button or div click.Here is the code which I am using from this <a href="http://forums.asp.net/t/1652535.aspx" rel="nofollow">http://forums.asp.net/t/1652535.aspx</a></p>

<pre><code>http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"

$(function () {
         var message = $('#message');
         var tr = $('#tbl').find('tr');
         tr.bind('click', function (event) {
         var values = '';
         var tds = $(this).find('td');
         $.each(tds, function (index, item) {
         values = values + 'td' + (index + 1) + ':' + item.innerHTML + '&lt;br/&gt;';
         });
         message.html(values);
         });
         });
</code></pre>

<p>and</p>

<pre><code> &lt;form id="form1" runat="server"&gt; 
        &lt;table id="tbl" style="border: solid 1px black"&gt; 
            &lt;tr&gt; 
                &lt;td&gt; 
                    1 
                &lt;/td&gt; 
                &lt;td&gt; 
                    a 
                &lt;/td&gt; 
            &lt;/tr&gt; 
            &lt;tr&gt; 
                &lt;td&gt; 
                    2 
                &lt;/td&gt; 
                &lt;td&gt; 
                    b 
                &lt;/td&gt; 
            &lt;/tr&gt; 
            &lt;tr&gt; 
                &lt;td&gt; 
                    3 
                &lt;/td&gt; 
                &lt;td&gt; 
                    c 
                &lt;/td&gt; 
            &lt;/tr&gt; 

        &lt;/table&gt; 
        &lt;br /&gt; 
        &lt;div id="message"&gt; 
        &lt;/div&gt; 
        &lt;/form&gt; 
</code></pre>

<p>Any suggestion?</p>
