Here is a simple example of how to do it (I'm using jquery to make it easier):
<html>
<head>
<script src="jquery-1.6.4.min.js"></script>
<script>
$(function(){
$('button').click(function(){
var rowsToAdd = $('input[type=text]').val();
if(rowsToAdd > 0){
for(var i = 0; i < rowsToAdd; i++){
$('table').append('<tr><td>Row Added</td></tr>');
}
}
});
});
</script>
</head>
<body>
<table>
<tr>
<td>
A row in the table
</td>
</tr>
</table>
<!-- The textbox allows you to enter a number which will be how many rows to add. -->
<input type="text" /><button>Add Rows</button>
</body>
</html>