Tema: innerHTML
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/06/2009, 08:01
manoloOZ
 
Fecha de Ingreso: octubre-2008
Mensajes: 151
Antigüedad: 15 años, 7 meses
Puntos: 1
innerHTML

hola tengo un problema, quiero que cada vez que toco
Código HTML:
 <a href = "javascript:agregar();">Subir otra</a>
<script>
var num = 0;
function agregar()
{
document.getElementById('cuerpotab3').innerHTML = '<table><tr><td><input type="file" name = "foto'+ num +'" /></td></tr></table>';
num = num + 1;
}

</script> 
me agrege ese nuevo html pero sin borrar el anterior
como hago?

muchas gracias