![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
come potrei fare in modo da avere nella variabile "secondi" non un numero intero ma comprensivo dei centesimi? var now =new Date(); var secondi = now.getSeconds(); ... + now.getMilliseconds()/1000 ? |
#3
| |||
| |||
|
|
Il Tue, 08 Jan 2008 16:14:15 GMT, pierino ha scritto: come potrei fare in modo da avere nella variabile "secondi" non un numero intero ma comprensivo dei centesimi? var now =new Date(); var secondi = now.getSeconds(); ... + now.getMilliseconds()/1000 ? |
#4
| |||
| |||
|
|
Così parlò Cristiano Larghi, alle ore 17.27.23 di martedì il 08/01/2008 Dopo Cristo Il Tue, 08 Jan 2008 16:14:15 GMT, pierino ha scritto: come potrei fare in modo da avere nella variabile "secondi" non un numero intero ma comprensivo dei centesimi? var now =new Date(); var secondi = now.getSeconds(); ... + now.getMilliseconds()/1000 ? ma così è a millesimi vero? quindi, può essere giusto così? function rnd_immagine(){ var now =new Date(); var secondi = now.getSeconds(); var centesimi = now.getMilliseconds()/1000; ----------------------------------------------- ma come fare ad implementarla in modo che venga esempio 10.55? rnd_numero = Math.floor(secondi/1.5); document.write('<img src="http://..' + rnd_numero +'.jpg">'); ..... |
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Corretta la variabile ho anche lasciato i millisec senza /1000. ------------------- script type="text/javascript" function rnd_immagine() { var now = new Date(); var millisec = now.getMilliseconds(); rnd_numero = Math.floor(millisec/1.5); document.write('<img src="http://..' + rnd_numero +'.jpg">'); } /script può andare ? |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
ma come fare ad implementarla in modo che venga esempio 10.55? |
![]() |
| Thread Tools | |
| Display Modes | |
| |