var rw = document.getElementsByTagName('tr');
<html> <head> </head> <body> <table> <tr><td>1<td>2 <tr><td>3<td>4 </table> <script> [].forEach.call(document.querySelectorAll('tr>*'), function(el){ alert(el.textContent); }); </script> </body> </html>