Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/05/2013, 22:12
Anarko
 
Fecha de Ingreso: febrero-2004
Mensajes: 1.987
Antigüedad: 20 años, 3 meses
Puntos: 22
cómo crear este un OBJETO??

Hola,

quiero tener múltiples segunderos.

Me puse a codear y esto no me esta funcionando...

Por favor ayuda.

Código PHP:
<script type="text/javascript">/*<![CDATA[*/
    
id=0;
    function 
segundero(nom,id){
        
this.s=0;
        
this.t=function(nom,id){
            
kja='<h3 style="margin:0">'+nom+'</h3><input type="text" name="s" id="id_'+id+'" size="1" />';
            
document.getElementById('cronox').innerHTML=kja+document.getElementById('cronox').innerHTML;
            }
        }
    function 
cronox(){
        
nom=prompt('Nombre del OBJ:');
        new 
segundero(nom,id);
        
id++;
        }
/*]]>*/</script><div id="cronox"></div><br /><a href="" onclick="cronox();return false;"> 
Creo que se entiende fácil...

Gracias