prova così:

codice:
function createTable(n) {
 var livello=null;
 var codice=null;
 if (document.getElementById) {
  livello=document.getElementById('liv');
  codice="<table style='width:500px;'>";
  for (var i=0; i<n; i++) codice+="<tr><td>Riga "+(i+1)+"</td></tr>";
  codice+="</table>";
  livello.innerHTML=codice;
 }
 else alert("Impossibile creare la tabella.");
}
da usare così:

codice:
<select name="menu" onchange="createTable(this.options[this.selectedIndex].value);">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

<div id="liv">&nbsp</div>
ciao