Re: getElementById su firefox è undefined
Von: vstucco@gmail.com [Profil]
Datum: 23.01.2007 09:27
Message-ID: <1169540832.924491.197600@q2g2000cwa.googlegroups.com>
Newsgroup: it.comp.lang.javascript
Datum: 23.01.2007 09:27
Message-ID: <1169540832.924491.197600@q2g2000cwa.googlegroups.com>
Newsgroup: it.comp.lang.javascript
Cristiano Larghi ha scritto: > In data 12 Jan 2007 08:05:22 -0800, vstucco@gmail.com ha scritto: > > > ho un problemuccio con questo codice javascript: > > > > var numero_set = document.getElementById('ajax-banner').value; > > alert(numero_set); > > > > perchè con explorer mi restituisce il valore che è nell'id del div > > ajax-bannere in firefox mi restituisce undefined? > > Cos'è ajax-banner? presumo un input text. > in tal caso: > a) hai più di un campo con lo stesso id > b) hai il name anziché l'id > Scusa se rispondo solo ora. Allora... non ho un campo con lo stesso id, e ajax-banner è l'id di un div, questo che segue: <div id="ajax-banner" name="ajax-banner" value="1"></div> Non sono ancora riuscito a risolverlo :-( Grazie in anticipo :-P -- Stucco[ Auf dieses Posting antworten ]
Antworten
- Sembro la carta (23.01.2007 09:44)
