<script> 
 // Get table object
	var myTable = document.getElementById('student_table').tBodies[0];

         // first loop for each row	
        for (var r=0, n = myTable.rows.length; r < n; r++) {
                       // this loop is getting each colomn/cells
			for (var c = 0, m = myTable.rows[r].cells.length; c < m; c++) {
              
			   if(myTable.rows[r].cells[c].childNodes[0].value){
				   	// get student names
					var StudentName = myTable.rows[r].cells[1].innerHTML;
					alert(StudentName); 
					
					// get student marks in each text boxes
			   		var marks = myTable.rows[r].cells[c].childNodes[0].value;
			   		alert(marks); 
			   }
            }
        }
</script>

<table width="400" border="1" cellpadding="0" cellspacing="1" id="student_table">
  <thead>
      <tr>
        <th scope="row">ID</th>
        <th scope="row">Name</th>
        <th scope="row">Country</th>
        <th scope="row">Marks</th>
        <th scope="row">Rank</th>
      </tr>
  </thead>
  
  <tbody>
      <tr>
        <td>1</td>
        <td>Smith</td>
        <td>US</td>
        <td><input type="text" name="marks" value="40"/></td>
        <td>4</td>
      </tr>
      <tr>
        <td>2</td>
        <td>John</td>
        <td>England</td>
        <td><input type="text" name="marks" value="80"/></td>
        <td>2</td>
      </tr>
        <tr>
        <td>3</td>
        <td>William</td>
        <td>Australia</td>
        <td><input type="text" name="marks" value="60"/></td>
        <td>3</td>
      </tr>
        <tr>
        <td>4</td>
        <td>Michael</td>
        <td>Germany</td>
        <td><input type="text" name="marks" value="90"/></td>
        <td>1</td>
      </tr>
  </tbody>
</table>