HighDots Forums  

nome array a oggetto?

Javascript (Italian) Il linguaggio JavaScript (it.comp.lang.javascript)


Discuss nome array a oggetto? in the Javascript (Italian) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
manauz
 
Posts: n/a

Default nome array a oggetto? - 09-11-2003 , 07:51 AM






Ciao,
posso dare per nome ad un oggetto, ad esempio un campo di testo, un
elemento di un array? fare ad esempio
<input type="text" name="textfield[2]"> ?
Sebbene abbia creato l'oggetto Array, il debugger dice che non è
definito...

grazie
m.

Reply With Quote
  #2  
Old   
-Ema-
 
Posts: n/a

Default Re: nome array a oggetto? - 09-11-2003 , 08:22 AM






manauz wrote:

Quote:
Ciao,
posso dare per nome ad un oggetto, ad esempio un campo di testo, un
elemento di un array? fare ad esempio
input type="text" name="textfield[2]"> ?
Sebbene abbia creato l'oggetto Array, il debugger dice che non è
definito...
Ovviamente si presume che l'array tu l'abbia dichiarato ed inizializzato
prima; devi mettere al posto del tuo tag input:

<SCRIPT type="text/javascript">
document.write( '<INPUT type="text" name="'
+ textfield[2] + '">' );
</SCRIPT>

Ciao.
-Ema-



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.