Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 
</head>
<body>
    
    <table id="tbl" style="border: solid 1px black; width:60%">
        <tr>
            <td>
                4
            </td>
            <td>
                fffz
            </td>
        </tr>
        <tr>
            <td>
                3
            </td>
            <td>
                k
            </td>
        </tr>
        <tr>
            <td>
                3
            </td>
            <td>
                7
            </td>
        </tr>
    </table>
    <br />
    <div id="message">msg
    </div>
   
</body>
</html>
 
        .row-highlight
        {
            background-color: Yellow;
        }
 
        $(function() {
          
            var message = $('#message');
          //alert(message);
            var tr = $('#tbl').find('tr');
            tr.bind('click', function(event) {
              alert("selected");
                var values = '';
                var tds = $(this).find('td');
                $.each(tds, function(index, item) {
                    values = values + item.innerHTML;
                });
                alert(values);
            });
        });
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers