gracias edward18_1 y uriss por sus respuestas ya lo logre hacer y era justamente con el split() jeje
Código Javascript
:
Ver original<script language="javascript">function crearText()
{
document.getElementById("idSeleccionado").value = '';
/*Obtencion del indice seleccionado*/
var indexSeleccion = document.getElementById('seleccion').selectedIndex;
/*Obtencion del value compuesto pór [id-integrantes]*/
var valorObtenido = document.getElementById('seleccion').options[indexSeleccion].value.split('-');
document.getElementById("idSeleccionado").value = valorObtenido[0];
var actuales = document.getElementById('seccion');
var cant=actuales.childNodes.length;
for(var f=0;f<cant;f++)
{
actuales.removeChild(actuales.childNodes[0]);
}
var cantidad = 0;
for(var f=0;f<valorObtenido[1];f++)
{
cantidad++;
var nuevohijo = document.createElement('input');
nuevohijo.type = 'text';
nuevohijo.name = 'deporte[]';
nuevohijo.id = 'nombre' + cantidad;
document.getElementById('seccion').appendChild(nuevohijo);
document.getElementById('seccion').appendChild(document.createElement('br'));
}
}
</script>
Gracias de verdad!!