$(document).ready(function(){ $("#theTable tr").click(function(e){ var result = ""; $.each($(this).children(), function(idx, obj){ result += idx + ": " + $(obj).text() + "\n"; }); $("#resultText").val(result); }); });
Select allOpen in new window
Open in new window
see attached example