[phpBB Debug] PHP Notice: in file /viewtopic.php on line 943: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 943: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
FORUM Webmaster • Heure dynamique javascript!
Crer son site Gratuitement : Service / Outils webmaster gratuit
Mon Site Gratuit
Contactez nous
Nos partenaires
Scripts
Tutoriaux
Nos services
Forums
Accueil
ForumsHeure dynamique javascript!
      Imprimer le sujet FAQ  M'enregistrer 
  Quelques animations simples et interractives ne ferons pas de mal à vos pages web. Partez découvrir le monde du Javascript !

Heure dynamique javascript!

Messagede Allstar27 le 24 Avr 2008, 01:08

Voici comment afficher l'heure en javascript avec un défilement de secondes sans actualiser!

A mettre entre <head> et </head>

Code: Tout sélectionner
<script language="JavaScript">
function HeureCheckEJS()
   {
   krucial = new Date;
   heure = krucial.getHours();
   min = krucial.getMinutes();
   sec = krucial.getSeconds();
   jour = krucial.getDate();
   mois = krucial.getMonth()+1;
   annee = krucial.getFullYear();
   if (sec < 10)
      sec0 = "0";
   else
      sec0 = "";
   if (min < 10)
      min0 = "0";
   else
      min0 = "";
   if (heure < 10)
      heure0 = "0";
   else
      heure0 = "";
   DinaHeure = heure0 + heure + ":" + min0 + min + ":" + sec0 + sec;
   which = DinaHeure
   if (document.getElementById){
      document.getElementById("ejs_heure").innerHTML=which;
   }
   setTimeout("HeureCheckEJS()", 1000)
   }
window.onload = HeureCheckEJS;
</SCRIPT>


A mettre dans votre page:

Code: Tout sélectionner
Il est <span id="ejs_heure">Initialisation</span>


Et voilà ce n'est pas plus compliquer! Enjoy :)
Allstar27
Nouveau Plug'zien
Nouveau Plug'zien
 
Messages: 6
Inscription: 24 Avr 2008, 00:52
Points: 0


Re: Heure dynamique javascript!

Messagede richie3366 le 24 Avr 2008, 13:13

Je n'ai pas testé mais cela m'a l'air correct ...
J'adore la variable "krucial" qui me fait rire !
Merci pour ce script de base mais qui peut servir n'importe où.

Cependant, concernant l'emplacement du script, il me semble qu'il faut soit :
- Le placer après la balise span concernée car le script peut planter puisque l'élément "ejs_heure" n'existe pas encore sur la page au chargement du script
- Placer le "window.onload = HeureCheckEJS;" après la balise span pour la même raison que précédemment.

À vérifier ...

Edit 2 : Le problème, c'est que c'est logiquement l'heure de l'ordinateur qu'il affiche et non forcément la bonne heure ! Donc cela revient à regarder en bas à droite de son écran (si on est sous windows non customisé) ou en haut à droite (si on est sous MacOS).
Le truc idéal en fait serait de donner l'heure du serveur (encore faut-il qu'elle soit exacte) via php (fonction date() ) (ou par exemple la piquer sur heure.com via php) et de faire ajouter les secondes petit à petit et puis faire un système de vérification du nombre de secondes (59 max) de minutes (59 max) et d'heures (23 max).
Mais bon, c'est un peu se torturer l'esprit pour rien si ce n'est s'entraîner en PHP/JS ...
Avatar de l'utilisateur
richie3366
Admin'z
Admin'z
 
Messages: 422
Inscription: 15 Mar 2007, 17:59
Localisation: Aveyron
Points: 123


Re: Heure dynamique javascript!

Messagede jeromecold le 24 Avr 2008, 14:25

Ce n'est pas un script de l'éditeur javascript ça?
http://www.editeurjavascript.com/scripts/scripts_temps_3_598.php
Arobase plus
Avatar de l'utilisateur
jeromecold
Plug'zien Pro
Plug'zien Pro
 
Messages: 3156
Inscription: 05 Sep 2007, 13:18
Points: 2915


Re: Heure dynamique javascript!

Messagede richie3366 le 24 Avr 2008, 19:12

mdr
Avatar de l'utilisateur
richie3366
Admin'z
Admin'z
 
Messages: 422
Inscription: 15 Mar 2007, 17:59
Localisation: Aveyron
Points: 123


Re: Heure dynamique javascript!

Messagede boulledogue le 25 Avr 2008, 19:51

ca fout tout en l'air ca :-(
Travaille actuellement sur www.restolity.be
Avatar de l'utilisateur
boulledogue
Modo'z
Modo'z
 
Messages: 2254
Inscription: 16 Mar 2007, 18:26
Localisation: Liège, Belgique
Points: 4455


Re: Heure dynamique javascript!

Messagede jeromecold le 25 Avr 2008, 20:32

De quoi qui quoi? :lol:
Arobase plus
Avatar de l'utilisateur
jeromecold
Plug'zien Pro
Plug'zien Pro
 
Messages: 3156
Inscription: 05 Sep 2007, 13:18
Points: 2915


Re: Heure dynamique javascript!

Messagede next465 le 29 Nov 2016, 12:45

Je voudrais lire à ce sujet plus. Prompt, ce que la littérature pour étudier?
Avatar de l'utilisateur
next465
Apprenti Plug'zien
Apprenti Plug'zien
 
Messages: 60
Inscription: 29 Nov 2016, 12:35
Points: 60


Re: Heure dynamique javascript!

Messagede KarlaB le 01 Avr 2017, 13:13

Merci pour ce post, je suis depuis longtemps à la recherche d'une solution à ce problème. merci
192.168.1.1
Avatar de l'utilisateur
KarlaB
Nouveau Plug'zien
Nouveau Plug'zien
 
Messages: 9
Inscription: 01 Avr 2017, 12:42
Points: 9


Re: Heure dynamique javascript!

Messagede malkova le 02 Mai 2017, 19:58

J'ai trouvé beaucoup d'informations utiles, merci à l'auteur pour le poste!
Avatar de l'utilisateur
malkova
Nouveau Plug'zien
Nouveau Plug'zien
 
Messages: 5
Inscription: 27 Oct 2016, 10:45
Points: 5


Re: Heure dynamique javascript!

Messagede linyuanyuan le 20 Déc 2017, 10:26

canada goose outlet
cheap oakley sunglasses
ferragamo shoes
uggs outlet
the north face outlet
moncler outlet online
cheap jordan shoes
coach outlet online
coach outlet online
salvatore ferragamo outlet
coach outlet online
coach factory outlet online
pandora charms sale clearance
uggs outlet
coach outlet online
canada goose jackets
polo ralph lauren outlet
fitflop sandals
michael kors outlet
louis vuitton factory outlet
louis vuitton outlet online
uggs outlet
michael kors outlet online
canada goose jackets
north face jackets
kate spade outlet online
moncler uk
red bottom
coach outlet canada
coach factory outlet online
valentino outlet
nike shoes
adidas yeezy boost
canada goose sale
ralph lauren outlet online
moncler sale
cheap ugg boots
air max shoes
ugg outlet
birkenstock outlet
cheap jordans
pandora uk
coach outlet online
gucci outlet online
christian louboutin sale
pandora charms sale clearance
michael kors handbags
ugg outlet
coach factory outlet online
supreme uk
burberry outlet online
ralph lauren outlet online
discount oakley sunglasses
mlb jerseys
burberry outlet online
coach outlet online
cheap nike shoes
michael kors outlet canada
canada goose coats
canada goose jackets
ugg canada
louis vuitton outlet online
cheap ray bans
burberry outlet online
ralph lauren uk
canada goose jackets
coach factory outlet online
bottes ugg
polo ralph lauren outlet online
michael kors
ralph lauren uk
nike outlet store
burberry outlet
coach outlet canada
louboutin outlet
cheap ugg boots
canada goose jackets
pandora charms
yeezy boost
harden vol 1
uggs clearance
coach outlet store
kate spade handbags
moncler uk
polo ralph lauren
uggs outlet
moncler jackets
ray ban sunglasses outlet
michael kors
adidas nmd r1
pandora jewelry
adidas outlet store
cheap air jordans
coach outlet online
michael kors outlet store
moncler jacket
michael kors outlet store
north face sale
burberry handbags
uggs outlet
moncler coats
cheap jordan shoes
moncler
ugg boots
cheap jordans for sale
fred perry polo shirts
coach factory outlet online
nike outlet store online
the north face jackets
christian louboutin shoes
mulberry handbags
moncler outlet online
polo ralph lauren outlet
ugg outlet online
tory burch outlet online
timberland outlet store
ugg boots
michael kors outlet clearance
canada goose outlet
longchamp bags
pandora charms sale clearance
louis vuitton outlet store
ugg outlet
coach factory outlet online
timberland outlet
ray ban sunglasses discount
cheap ugg boots
kate spade handbags
ugg boots outlet
the north face outlet
cheap jordan shoes
ralph lauren outlet
michael kors outlet store
canada goose outlet
ugg outlet store
ralph lauren
adidas superstars
uggs outlet
polo ralph lauren outlet
coach outlet online
pandora jewelry outlet
ugg boots
coach outlet online
nike outlet store
ugg sale
adidas nmd runner
fitflops sale clearance
cheap air jordans
ugg boots
canada goose coats
michael kors outlet online
valentino
cheap air jordans
michael kors outlet online
ugg boots
moncler outlet online
coach factory outlet online
louis vuitton handbags
canada goose outlet online
adidas store
uggs on sale
pandora charms outlet
ralph lauren outlet online
coach outlet online
ferragamo outlet
michael kors outlet online
coach outlet store online
adidas yeezy shoes
uggs outlet
canada goose jackets
yeezy boost 350
coach outlet online
cheap oakley sunglasses
air max
mbt
moncler coats
uggs on sale
red bottom heels
nike air max 2018
ralph lauren sale
pandora jewelry store
uggs outlet
yeezy boost 350
polo ralph lauren outlet
canada goose sale
ugg australia outlet
uggs outlet
louis vuitton outlet online
longchamp outlet
gucci outlet
coach outlet online
pandora charms outlet
michael kors uk
canada goose jackets
michael kors outlet online
adidas nmd runner
pandora charms sale clearance
nike outlet online
canada goose parka
ugg outlet store
coach factory outlet online
canada goose jackets
hermes outlet
canada goose outlet
polo ralph lauren outlet online
moncler sale
north face outlet
coach factory outlet
coach outlet online
coach factory outlet online
louis vuitton factory outlet
cheap nfl jerseys wholesale
ugg boots sale
ugg
uggs outlet
coach factorty outlet online
coach outlet online
cheap jordan shoes
nike sneakers
canada goose jackets uk
coach factorty outlet online
birkin handbags
canada goose jackets
kate spade outlet online
cheap ugg boots
pandora charms
michael kors outlet store
kate spade outlet
ralph lauren sale
uggs clearance
longchamp bags
pandora charms outlet
coach outlet
hermens
pandora outlet
pandora charms sale
moncler jackets
michael kors
adidas yeezy boost 350
louboutin outlet
michael kors bags
nfl jerseys
adidas sneakers
canada goose jackets
ugg boots
ugg outlet store
canada goose outlet store
oakley sunglasses outlet
birkenstock shoes
coach factory outlet
ugg boots
tory burch outlet online
ugg boots
nfl jerseys
moncler pas cher
canada goose jackets
nike outlet
canada goose jackets
canada goose outlet
polo ralph lauren outlet
nike sneakers
louis vuitton outlet store
hermes bags
longchamp sale
hermes bag
canada goose jackets
coach outlet online
ugg outlet
ugg boots
polo ralph lauren
cheap uggs
ugg boots women
adidas superstar shoes
moncler coats
longchamp outlet store
michael kors outlet clearance
coach outlet store online clearance
kate spade outlet
air jordan retro
canada goose jacket
polo ralph lauren outlet
canada goose
ugg outlet online
north face outlet
jordans
uggs outlet
canada goose
canada goose outlet
salvatore ferragamo shoes
ray ban sunglasses discount
ugg boots
canada goose coats
pandora
ray bans
canada goose jackets
ralph lauren
kate spade handbags
ugg boots
ralph lauren uk
coach outlet store
yeezy boost 350
canada goose jackets
ugg boots outlet
moncler outlet online
mlb jerseys cheap
coach factory outlet
adidas outlet online
nmd adidas
coach purses
cheap jordans free shipping
canada goose coats
supreme shirts
tory burch shoes
pandora uk
ugg canada
moncler jackets
caterpillar boots
michael kors outlet online
ugg boots outlet
coach factory outlet
mlb jerseys
ray ban glasses
ugg outlet online
ralph lauren
coach factory outlet online
oakley sunglasses outlet
yeezy shoes
burberry handbags
canada goose jackets
polo outlet online
mulberry
michael kors outlet canada
cheap oakley sunglasses
uggs
coach outlet online
ugg outlet
pandora charms outlet
north face jackets
coach factory outlet online
canada goose coats
coach outlet online
canada goose jackets
polo ralph lauren outlet online
polo ralph lauren outlet online
ralph lauren
ralph lauren outlet online
mulberry uk
nike shoes
coach outlet store
louis vuitton outlet
pandora charms
michael kors outlet clearance
adidas shoes
ralph lauren outlet online
coach outlet online
canada goose
louis vuitton factory outlet
canada goose
uggs outlet
canada goose outlet online
ralph lauren outlet online
canada goose jackets
ray ban sunglasses cheap
columbia sportswear outlet
adidas outlet online
yeezy shoes
air max
canada goose coats
michael kors
ralph lauren outlet online
cheap ray ban sunglasses
red bottoms
retro 11
coach outlet online
coach factory outlet
michael kors outlet store
air jordan shoes
polo ralph lauren outlet
cheap jordan shoes
nike outlet online
coach outlet online
canada goose
supreme clothing
michael kors
canada goose sale
canada goose jackets
canada goose jackets
ray bans
adidas outlet store
canada goose sale
air jordans
yeezy shoes
coach outlet store online
canada goose sale
michael kors outlet clearance
christian louboutin shoes
kate spade outlet online
coach outlet store online
the north face outlet
fred perry shirts
michael kors
pandora charms
michael kors outlet store
mulberry outlet uk
michael kors outlet store
coach handbags outlet
adidas nmd r1
canada goose jackets
adidas yeezy boost
coach outlet online
polo ralph lauren outlet online
christian louboutin shoes
michael kors outlet online
ugg boots
burberry handbags
uggs outlet
ugg outlet store
pandora jewelry outlet
michael kors outlet online
louboutin shoes
hermes bags
toms shoes
pandora jewelry
adidas nmd r1
adidas ultra boost
hermes handbags
171220yueqin
linyuanyuan
Funny Plug'z
Funny Plug'z
 
Messages: 144
Inscription: 26 Jan 2016, 03:13
Points: 148


wwwww

Messagede wwwww le 10 Jan 2018, 10:01

hermes belts
kobe basketball shoes
gucci belts for men
jordan 6
retro jordans
adidas superstar
cheap jordan shoes
nike air max 2018
air jordan 6
michael kors outlet online
true religion outlet
adidas nmd r1
asics running shoes
mlb jerseys
100% real jordans for cheap
vans outlet
air jordan shoes
roshe run
ultra boost
nike air force 1
nike dunk low
lacoste online shop
nike hyperdunk 2017
adidas outlet
hermes belt
lebron james shoes
huarache shoes
nike mercurial vapor
nike basketball shoes
yeezy boost
michael kors outlet handbags
longchamp handbags
adidas superstar UK
atlanta falcons jersey
nike air max 90
nike roshe one
lebron shoes
yeezy
nmd
christian louboutin shoes
golden goose sneakers
lebron 13 low
nike zoom
air max 90
air jordan 12
adidas nmd
jordan shoes
nike air force 1 high
longchamp longchamps
longchamp bags
air max 95
adidas ultra boost
nike huarache
lebron 15
yeezy boost 350 v2
led shoes
adidas yeezy boost
michael kors outlet
kobe shoes
adidas tubular UK
vibram fivefingers
kobe byrant shoes
michael kors outlet
yeezy boost 350
ultra boost 3.0
nike air force
nike air force
asics sneakers
goyard handbags
air max
cheap jordans
fitflops sale clearance
adidas superstar
cheap nba jerseys
adidas nmd
adidas stan smith women
chrome hearts outlet
moncler sale
jordan shoes
kobe 11
yeezy boost 350
true religion jeans
hogan outlet online
true religion outlet
supreme clothing
light up shoes
adidas store
cheap jordans
converse outlet
yeezy shoes
vans shoes
kyrie 4
adidas neo
nike air zoom structure 19
irving shoes
fitflops sale
adidas nmd
michael kors handbags
air max 90
yeezy boost 350 v2
yeezy boost 350
lebron 15 shoes
louboutin shoes
nike hyperdunk
michael kors outlet online
nike polo
kyrie 3
james harden shoes
longchamp
longchamps
nike mercurial
yeezy
nike dunks
nike air max 90
adidas stan smith men
balenciaga sneakers
chrome hearts
gucci belts
adidas online shop
kevin durant shoes
adidas shoes
nmd r1
nhl jerseys
calvin klein underwear
jordan shoes
yeezy boost 350 v2
air force ones
hermes belts
kate spade handbags
michael kors factory outlet
supreme hoodie
adidas outlet online
michael kors handbags
yeezy
falcons jersey
golden goose outlet
longchamp bags
air jordans
yeezy shoes
cheap nfl jerseys china
stephen curry shoes
longchamp handbags
kobe sneakers
off white hoodie
cheap mlb jerseys
ysl handbags
kate spade outlet
off white hoodie
nike huarache
true religion
nike air force 1
nmd
adidas yeezy boost
michael kors purses
yeezy boost 350
goyard handbags
cheap nfl jerseys
huaraches
links of london
links of london
jordan shoes
air max 2018
cheap jordans
cartier bracelet
bape hoodie
pandora bracelet
kyrie 4
curry 3
foamposites
air jordan
cheap jordans
yeezy shoes
nike huarache sale
cartier love bracelet
van cleef arpels
adidas stan smith
vanvan cleef and arpels
kobe shoes
nike air max95
gucci belt
prada eyeglasses
timberland outlet
golden goose sneakers
nike air max 2017
adidas gazelle
kate spade outlet
kyrie irving shoes
pandora charms
nike air max 2016
adidas neo online shop
moncler outlet
fitflops
hermes handbags
yeezy boost
nike roshe run
birkin bag
supreme clothing
prada sunglasses
balenciaga shoes
yeezys
harden shoes
curry 2
huarache shoes
lacoste polo
golden goose
lebron 13
kate spade outlet online
adidas gazelle sale
longchamp handbags
hyperdunks
adidas yeezy
yeezy sneakers
patriots jersey
nike air max
hermes bag
lebron 14
nba jerseys
adidas yeezy
calvin klein outlet
yeezy shoes
michael kors
curry shoes
adidas ultra boost 3.0
basketball shoes
nike roshe run
under armour curry 3
pandora bracelet
hogan outlet
kobe byrant shoes
converse shoes
vans store
retro jordans
pandora charms
pandora jewelry
light up shoes
kobe 9
jordan retro
tory burch shoes
hermes birkin
michael kors outlet
balenciaga shoes
kd shoes
adidas tubular x
lebron 15
jordan retro 13
adidas ultra boost
jordan retro
timberland shoes
adidas nmd
converse shoes
longchamp
air jordan
hermes birkin
nike lebron 14
jordan 11
christian louboutin shoes
led light up shoes
moncler
jordan retro
michael kors outlet
michael kors handbags
air max 90
yeezy boost
nike lebron 15
cheap nhl jerseys
goyard tote
nike air max
air jordan 11
bape hoodie
yeezy
yeezy
nike roshe run one
adidas yeezy
adidas stan smith uk
adidas eqt support adv
adidas ultra boost 3.0
kobe 11
adidas stan smith
chrome hearts online
golden goose
longchamp bags
nike kyrie 3
converse outlet store
real jordans for sale cheap
ferragamo sale
hermes belt
adidas ultra boost
christian louboutin
ferragamo belt
kobe 9
dior sunglasses
tom ford sunglasses
lacoste outlet
jordan 12
jordan 13
yeezy shoes
adidas yeezy boost
nike air max 90
yeezy boost 350 v2
jordan 4
yeezys
lebron 13 shoes
links of london sale
nike huarache
curry 4
jordan shoes
nike roshe run
adidas tubular
new england patriots jerseys
true religion jeans
adidas tubular
longchamp outlet
basketball shoes
adidas nmd
nike huarache
tom ford glasses
curry 4
michael kors outlet
moncler jackets
curry 3
hermes belt
adidas outlet
longchamp
yeezy boost
adidas tubular
nike zoom
off white clothing
pandora jewelry
adidas eqt
nfl jerseys
chrome hearts
nike hyperdunk
balenciaga sneakers
patriots jerseys
nike air force 1 low
reebok outlet
nike free run
birkin bag
vans shoes
kobe basketball shoes
adidas yeezy
nike air zoom
bape clothing
tory burch shoes
nike air zoom pegasus 32
WWW
Avatar de l'utilisateur
wwwww
Mini Plug'zien
Mini Plug'zien
 
Messages: 29
Inscription: 10 Jan 2018, 09:55
Points: 29



Retourner vers Javascript

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 0 invités