Entendi esto espero te sirva
Código HTML:
<form name="surf">
<select name="select" onChange="preguntar();">
<option>opcion</option>
<option>otra opcion</option>
<option>deducibles</option>
</select>
<BR />
<div id="deducciones"></div>
<BR />
<input type="submit" value="Enviar">
</form>
<script>
function preguntar()
{
if(surf.select.options[surf.select.selectedIndex].text == "deducibles")
{
generar(prompt("Introduce el numero de deducciones", "1"))
}
}
function generar(x)
{
var codigo = "";
for(i=0;i<x;i++)
{
codigo+= (i+1) + ". <input type='text'><br />";
}
document.getElementById("deducciones").innerHTML = codigo;
}
</script>