Saludos mickeyy
Prueba con estos cambios:
Código:
<script language="JavaScript">
txt = "";
function cambia(){
funcion = frm.selector.options[frm.selector.selectedIndex].value;
if (funcion == "2") {
txt = "1.-<input type=\"text\" name=\"uno\"><br>";
txt += "2.-<input type=\"text\" name=\"dos\"><br>";
}
if (funcion == "3") {
txt = "1.-<input type=\"text\" name=\"uno\"><br>";
txt +="2.-<input type=\"text\" name=\"dos\"><br>";
txt +=" 3.- <input type=\"text\" name=\"tres\"><br>";
}
if (funcion == "4") {
txt = "1.-<input type=\"text\" name=\"uno\"><br>";
txt +="2.-<input type=\"text\" name=\"dos\"><br>";
txt +=" 3.- <input type=\"text\" name=\"tres\"><br>";
txt+=" 4.- <input type=\"text\" name=\"cuatro\"><br>";
}
document.write(txt);
}
</script>
</head>
<body>
<form name="frm">
Seleccione el numero de respuestas:<select name="selector" onchange="cambia()">
<option>Seleccione un valor</option>
<option value="2">Dos</option>
<option value="3">Tres</option>
<option value="4">Cuatro</option>
</select><br>
</form>