IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Script date heure qui ne fonctionne par sous IE11 ?!?


Sujet :

JavaScript

  1. #1
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2016
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Mars 2016
    Messages : 83
    Par défaut Script date heure qui ne fonctionne par sous IE11 ?!?
    Bonjour
    Y a t'il une astuce pour que ce script, qui fonctionne parfaitement bien sur Chrome, s'affiche sur IE11 ?
    Le script est peut être bloqué par l’administrateur du réseau sur lequel je l'essaye. Mon chrome est en portable.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    <!DOCTYPE html>
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>Date Time UTC Local</title>
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
     <script type="text/javascript" language="Javascript">
    function heure () {
    var Maintenant = new Date();
    var heures = Maintenant.getUTCHours();
    var minutes = Maintenant.getUTCMinutes();
    var secondes = Maintenant.getUTCSeconds();
    var jour=new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
    var date = Maintenant.getUTCDate();
    var mois = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
    var année = Maintenant.getUTCFullYear();
    heures = ((heures < 10) ? " 0" : " ") + heures;
    minutes = ((minutes < 10) ? ":0" : ":") + minutes;
    secondes = ((secondes < 10) ? ":0" : ":") + secondes;
    document.getElementById("horloge").value = jour[Maintenant.getUTCDay()] + ", " + date +" "+ mois[Maintenant.getUTCMonth()]+" "+année+"  - "+ heures + minutes + secondes + " UTC";
    setTimeout("heure()",1000);
    }
     
     
    function heureL () {
    var Local = new Date();
    var heuresL = Local.getHours();
    var minutesL = Local.getMinutes();
    var secondesL = Local.getSeconds();
    var jourF = new Array("Dim","Lun","Mar","Mer","Jeu","Ven","Sam");
    var dateL = Local.getDate();
    var moisF = new Array('Jan','Fev','Mar','Avr','Mai','Juin','Juil','Aout','Sep','Oct','Nov','Déc');
    var annéeL = Local.getFullYear();
    heuresL = ((heuresL < 10) ? " 0" : " ") + heuresL;
    minutesL = ((minutesL < 10) ? ":0" : ":") + minutesL;
    secondesL = ((secondesL < 10) ? ":0" : ":") + secondesL;
    document.getElementById("horlogeL").value = jourF[Local.getDay()] + ", " + dateL +" "+ moisF[Local.getMonth()]+" "+annéeL+"  - "+ heuresL + minutesL + secondesL + " Local";
    setTimeout("heureL()",1000);
    }
     
    window.onload = function() { heure(); heureL(); };
     
    </script>
    </head>
     
    <body onload="initInputonload();raz()" style="font-family:verdana; font-size:13px">
    <div id="time" style="width: 324px; height: 72px">
     <input id="horloge" readonly="readonly" style="border:1px solid grey; border-radius:2px; text-align:center; font-family:Verdana; color:#FFFFFF; background-color: #4285F4; font-size:12pt; " size="33" name="horloge">
     <p></p>
    	<p>
     <input id="horlogeL" readonly="readonly" style="border:1px solid grey; border-radius:2px; text-align:center; font-family:Verdana; color:#0000FF; font-size:12pt; " size="33" name="horlogeL">
     </p>
     
    </div></body></html>
    Merci

  2. #2
    Membre éprouvé
    Profil pro
    Développeur .NET
    Inscrit en
    Novembre 2010
    Messages
    127
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Conseil

    Informations forums :
    Inscription : Novembre 2010
    Messages : 127
    Par défaut
    Il y a déjà un souci avec tes variables "année" et "annéeL" --> Pas d'accents pour les noms de variable !

  3. #3
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    Bonjour,
    @chadoum :
    --> Pas d'accents pour les noms de variable !
    pas de soucis dès lors qu'il sont en accord avec le charset : Identifier Names and Identifiers.

    @plefever : Il semblerait que tu appelles une fonction sur le onload du <body> qui n'existe pas dans ton code.
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <body onload="initInputonload();raz()" style="font-family:verdana; font-size:13px">

  4. #4
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2016
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Mars 2016
    Messages : 83
    Par défaut
    @NoSmoking : Effectivement c'est extrait d'une page, et j'ai oublié de retirer les appels de fonction dans le <body> Mais même en retirant onload="initInputonload();raz()" ça ne change pas le problème dans IE11.

  5. #5
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2016
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Mars 2016
    Messages : 83
    Par défaut
    Étrange, sur mon PC, chez moi, ca marche sur IE 11. Pourquoi un script aussi banal serait bloqué au bureau ?

  6. #6
    Membre très actif
    Homme Profil pro
    bricoleur par les mots
    Inscrit en
    Avril 2015
    Messages
    744
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 80
    Localisation : France, Seine Maritime (Haute Normandie)

    Informations professionnelles :
    Activité : bricoleur par les mots
    Secteur : Distribution

    Informations forums :
    Inscription : Avril 2015
    Messages : 744
    Par défaut
    ça marche chez moi aussi

  7. #7
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    J'ai omis un élément important également c'est l'encodage de ta page qui visiblement n'est pas le même.

    Je viens de tester ton code et en copiant ton code sous Notepad++
    • avec un encodage UTF-8 sans BOM ton code ne marche pas sous IE Edge mais marche sous IE11
    • avec un encodage Europe window-1252 ton code fonctionne correctement

    Passe à l'UTF-8, à lire et à mettre en application : Encoder son site intégralement en UTF-8

    Autre chose au passage language="Javascript"> est obsolète et un simple <script> est suffisant en HTML5.

    Tu trouverais avantage à simplifier l'entête de tes fichiers comme suit
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    <!DOCTYPE html>
    <html lang="fr">
    <head>
    <meta charset="UTF-8">
    <title></title>
    <script>
    // ton code ici
    </script>

    Et même si dans certaines conditions, que l'on vient de voir, l'utilisation des accents dans le nom des variables est globalement à éviter.

  8. #8
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2016
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Mars 2016
    Messages : 83
    Par défaut
    Merci, j'avais depuis le début un soucis avec ça. Je travaille sur un vieux frontpage.
    J'ai corrigé et j'ai tout ouvert avec Notepad et enregistré en UTF8.
    Merci pour ces éclaircissements.
    Mes horloges ne fonctionnent pas dans la page complète sou IE11. Je préfère Chrome qui marche beaucoup mieux, mais quand même, je voudrai que tout soit clair.
    Voici ce code:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    <!DOCTYPE html>
    <html lang="fr">
    <head>
    <meta charset="UTF-8">
    <title>Meteo-Consorzio-Lamma-HR</title>
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
         <style>
     
    body{
        font-family: verdana ;
        font-size:13px
    }        
    div#titre {
        float: left;
        margin-left: 20px;
        margin-top: -2px;
    }
    div#selection {
        float: left;
        margin-left: 32px;
        margin-top: 3px;
    }
    div#bouton-afficher {
        float: left;
        margin-left: 20px;
        margin-top: 1px;
    }
    div#CtrlS {
        float: left;
        margin-left: 20px;
        margin-top: 3px;
    }
    div#imagescharge {
        float: right;
        margin-right: 20px;
        margin-top: 3px;
    }
    div#loader {
        float: left;
        width: 100%;
        margin-top: -4px;
    }
    #progressBarb{	
        height: 2px;	
    	background-color: #2300FF;	
    	text-align: right;	
    }
    #progressBar{
    	height: 2px;
    	background-color: #CACACA;
    	width: 100%;	
    }div#time {
        float: left;
        margin-top: 10px;
        margin-left: 0px;
    }
    div#conteneur {
        float: left;
        margin-left: 3px;
        margin-top : 6px;
        width: 780px;
        height: 580px;         
    }
    div#liens {
        float: left;
        padding-top : 6px;
        padding-left: 16px;
    }
     
    .onoffswitch {
        float: left; width: 120px; margin-top: -5px; margin-bottom: 0
        -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
    }
    .onoffswitch-checkbox {
        display: none;
    }
    .onoffswitch-label {
        display: block; overflow: hidden; cursor: pointer;
        border-radius: 2px;
    }
    .onoffswitch-inner {
        display: block; width: 200%; margin-left: -100%;
        transition: margin 0.3s ease-in 0s;
    }
    .onoffswitch-inner:before, .onoffswitch-inner:after {
        display: block; float: left; width: 50%; height: 24px; padding: 0; line-height: 26px;
        font-family:'Helvetica Neue',Arial,sans-serif;
    	font-size:16px;
     
        box-sizing: border-box;
    }
    .onoffswitch-inner:before {
        content: "HORS LIGNE";
    text-align: center;
        background-color: #FF0000; color: #FFFFFF;
    }
    .onoffswitch-inner:after {
        content: "EN LIGNE";
     
        background-color: #4285F4; color: #FFFFFF;
        text-align: center;
    }
    .onoffswitch-switch {
        transition: all 0.3s ease-in 0s; 
    }
    .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
        margin-left: 0;
    }
    .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
        right: 0px; 
    }
    </style>
     
        <script>
     
    function initInputonload() {
     
        var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"
     
        if (document.body.attachEvent)
              document.body.attachEvent("on" + mousewheelevt, rotateimage);
            else if (document.body.addEventListener)
                     document.body.addEventListener(mousewheelevt, rotateimage, false);
    document.body.addEventListener('keydown', selectImagesWithArrow); 
        conteneur.innerHTML = "";
        initInput();
     
    }
    function raz() {
     	document.getElementById("pourcentage").innerHTML = "" ;
    	document.getElementById("progressBarb").style.width = 0 + "%";
    	document.getElementById("progressBarb").innerHTML = "";
    	document.getElementById("nombre").innerHTML = "" ;
    }  
     
     
    function initInput() {
     
        var url = document.getElementById("affichage").value ;       
        var type = document.getElementById("type").value;
        var region = document.getElementById("region").value;    
     
        var n = url.lastIndexOf("/"); 
        url = url.slice(0,n+1) + type + region + "_web_*.png";
        document.getElementById("affichage").value = url;
     }
     
    function afficheImages() {
     
     
        if(document.getElementById("offline").checked) {
     
            afficheImagesHorsConnexion();
            return;        
        }
     
        var url = document.getElementById("affichage").value;
     
        if (url.indexOf("*") === -1) {
     
          document.getElementById("msg").innerHTML = "L'url doit contenir le caractère '*' ! ";
          return;
        }
     
        var nbrBegin = +document.getElementById("nbrBegin").value;
        var nbrEnd = +document.getElementById("nbrEnd").value; 
        var monImg ;  
        var conteneur = document.getElementById("conteneur");
     
        conteneur.innerHTML = "";
     	nbrImagesLoaded = 0 ;
     
    	document.getElementById("pourcentage").innerHTML = "" ;
    	document.getElementById("progressBarb").style.width = 0 + "%"; 
        for (var i= nbrBegin; i<= nbrEnd; i++) {
     
            monImg = document.createElement('img');     
            monImg.src = url.replace("*", i);
            monImg.style.visibility = 'hidden' ;
            monImg.style.position = "absolute";
            monImg.id = "image " + i ;		
    		monImg.onload = funcLoadImage ;
            conteneur.appendChild(monImg);           
        }
     
        document.images[0].style.visibility = "visible";    
     
    }
     
     
     
    function afficheImagesHorsConnexion() {
     
        var url = document.getElementById("affichage").value;    
        var n = url.lastIndexOf("/");          
        var pathImages = "./" + document.title + "_files" + url.slice(n);    
     
        var nbrBegin = +document.getElementById("nbrBegin").value;
        var nbrEnd = +document.getElementById("nbrEnd").value; 
        var monImg ;  
        var conteneur = document.getElementById("conteneur");
     
        conteneur.innerHTML = "";
     
        for (var i= nbrBegin; i<= nbrEnd; i++) {
     
            monImg = document.createElement('img');     
            monImg.src = pathImages.replace("*", i);
            monImg.style.visibility = 'hidden' ;
            monImg.style.position = "absolute";        
            conteneur.appendChild(monImg);           
        }
     
        document.images[0].style.visibility = "visible";
     
    }
    var nbrImagesLoaded = 0 ;
     
     
    function funcLoadImage() {
     
    	var pourcentage = 100 * (nbrImagesLoaded+1)/document.getElementById("nbrEnd").value ;
    	var nbrEnd = +document.getElementById("nbrEnd").value;
     
     
    	document.getElementById("pourcentage").innerHTML = " " + (nbrImagesLoaded+1);	
    	document.getElementById("progressBarb").style.width = pourcentage + "%";	
    	document.getElementById("nombre").innerHTML = "/" + nbrEnd + " images";
     
    	nbrImagesLoaded++;
    }  
     
    var myimages = document.images;
    var currentImage = 0 ;
    var nextImage = 0 ;
     
    function rotateimage(e) {
     
        if(myimages.length === 0) return ;
     
        var evt = window.event || e     //equalize event object
        var delta = evt.detail ? evt.detail * (-120) : evt.wheelDelta     //delta returns +120 when wheel is scrolled up, -120 when scrolled down
        nextImage = (delta <= -120) ? nextImage + 1 : nextImage - 1 //move image index forward or back, depending on whether wheel is scrolled down or up    
     
        nextImage = (nextImage < 0) ? 0 : (nextImage > myimages.length - 1) ? myimages.length - 1 : nextImage
     
     
        myimages[currentImage].style.visibility = "hidden";    
        myimages[nextImage].style.visibility = "visible";
        currentImage = nextImage ;
     
        if (evt.preventDefault)
            //disable default wheel action of scrolling page
            evt.preventDefault()
        else
            return false ;
     
    }
     function selectImagesWithArrow(event) {
     
                if (myimages.length === 0) return;
                var touche_Fleche = (event.keyCode === 38) || (event.keyCode === 40);
                if(!touche_Fleche) return;        
                if (event.keyCode === 38) nextImage--;
                else if (event.keyCode === 40) nextImage++;
     
                nextImage = (nextImage < 0) ? 0 : (nextImage > myimages.length - 1) ? myimages.length - 1 : nextImage;
     
                   myimages[currentImage].style.visibility = "hidden";    
        myimages[nextImage].style.visibility = "visible";
        currentImage = nextImage ;;
     
                if (event.preventDefault)
                //disable default wheel action of scrolling page
                    event.preventDefault();
                else
                    return false;
     
            }        
     
    function heure () {
    var Maintenant = new Date();
    var heures = Maintenant.getUTCHours();
    var minutes = Maintenant.getUTCMinutes();
    var secondes = Maintenant.getUTCSeconds();
    var jour=new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
    var date = Maintenant.getUTCDate();
    var mois = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
    var année = Maintenant.getUTCFullYear();
    heures = ((heures < 10) ? " 0" : " ") + heures;
    minutes = ((minutes < 10) ? ":0" : ":") + minutes;
    secondes = ((secondes < 10) ? ":0" : ":") + secondes;
    document.getElementById("horloge").value = jour[Maintenant.getUTCDay()] + ", " + date +" "+ mois[Maintenant.getUTCMonth()]+" "+année+"  - "+ heures + minutes + secondes + " UTC";
    setTimeout("heure()",1000);
    }
     
     
    function heureL () {
    var Local = new Date();
    var heuresL = Local.getHours();
    var minutesL = Local.getMinutes();
    var secondesL = Local.getSeconds();
    var jourF = new Array("Dim","Lun","Mar","Mer","Jeu","Ven","Sam");
    var dateL = Local.getDate();
    var moisF = new Array('Jan','Fev','Mar','Avr','Mai','Juin','Juil','Aout','Sep','Oct','Nov','Déc');
    var annéeL = Local.getFullYear();
    heuresL = ((heuresL < 10) ? " 0" : " ") + heuresL;
    minutesL = ((minutesL < 10) ? ":0" : ":") + minutesL;
    secondesL = ((secondesL < 10) ? ":0" : ":") + secondesL;
    document.getElementById("horlogeL").value = jourF[Local.getDay()] + ", " + dateL +" "+ moisF[Local.getMonth()]+" "+annéeL+"  - "+ heuresL + minutesL + secondesL + " Local";
    setTimeout("heureL()",1000);
    }
     
    window.onload = function() { heure(); heureL(); };
     
    </script>
     
    </head>
     
    <body onload="initInputonload();raz()" style="font-family:verdana; font-size:13px">
     
    <div class="onoffswitch">
        		<p style="margin-top: 4px">
        		<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="offline" checked="">
        		<label class="onoffswitch-label" for="offline">
            	<span class="onoffswitch-inner"></span>
            	<span class="onoffswitch-switch"></span></label></p>
            </div>
    		<div id="titre">
    			<font face="Arial" size="5">
    			<a target="_blank" style="text-decoration: none; color: #0000FF; font-weight:600" href="http://www.lamma.rete.toscana.it/mare/modelli/vento-e-mare-hr">Consorzio Lamma</a><span style="vertical-align: middle">&nbsp;</span></font><span style="vertical-align: middle"><font face="Arial" size="5" color="#FF0000">HR</font>
    		</span></div>
    		<div id="selection">
    			<select size="1" id="region" onchange="initInput()" name="D1">
                <option value="z4">Côte d'Azur</option>
    			<option value="z5">Corse</option>
               	<option value="z2">Archipel toscan</option>
            	<option value="z1">Ligure</option>
    			<option value="z3">Golfe de Gênes</option>
    			</select>
     			<select size="1" id="type" onchange="initInput()" name="D2">
                <option value="wind10m">Vent</option>
    			<option value="mwp">Houle</option>
    			<option value="swh">Hauteur des vagues</option>
    			<option value="windgust">Rafales</option>
    			<option value="sst">Température de la mer</option>
    			<option value="pcp">Précipitations</option>
    			<option value="ct">Nuages</option>
            	</select>  
             	<select size="1" id="nbrEnd" onchange="changementParametre(event)" name="D3">
                <option value="10">1 jour</option>
    			<option value="36">2 jours</option>
    			<option value="44">3 jours</option>
    			<option value="50">4 jours</option>
    			<option value="57" selected="">5 jours</option>
    			</select>  
            </div>  
            <div id="bouton-afficher">
            	<input type="button" name="RefreshButton" style="cursor: pointer" value="Chargement des cartes" onclick="afficheImages();raz()">
            </div>
            <input type="text" style="display:none" id="affichage" value="http://www.lamma.rete.toscana.it/models/ww3_hiwin/last/TYPEREGION_web_*.png" ;="" size="79" name="T1"> 
            <input type="number" style="display:none" id="nbrBegin" onchange="changementParametre(event)" value="1" min="1" max="61" name="T2" size="20">
           	<div id="CtrlS">
    				<b><font color="#707070">Ctrl + S</font></b><font face="Verdana" color="#707070"> pour enregistrer les données.</font>
    		</div>
    		<div id="imagescharge"><font face="Verdana" color="#707070">		
    				<label id="pourcentage" style="color: red"></label><label id="nombre" style="color: #707070"></label></font><p></p>
    		</div>
    		<div id="loader">
    			<div id="progressBar">
    			<div id="progressBarb" style="width: 0%;"></div></div>
    		</div>
     
     
     
     
     
     
     
     
       <div id="conteneur"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_1.png" style="visibility: visible; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_2.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_3.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_4.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_5.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_6.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_7.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_8.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_9.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_10.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_11.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_12.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_13.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_14.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_15.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_16.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_17.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_18.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_19.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_20.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_21.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_22.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_23.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_24.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_25.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_26.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_27.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_28.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_29.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_30.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_31.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_32.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_33.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_34.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_35.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_36.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_37.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_38.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_39.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_40.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_41.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_42.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_43.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_44.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_45.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_46.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_47.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_48.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_49.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_50.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_51.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_52.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_53.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_54.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_55.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_56.png" style="visibility: hidden; position: absolute;"><img src="./Meteo-Consorzio-Lamma-HR_files/wind10mz4_web_57.png" style="visibility: hidden; position: absolute;"></div>
     <div id="time" style="width: 324px; height: 72px">
     <input id="horloge" readonly="readonly" style="border:1px solid grey; border-radius:2px; text-align:center; font-family:Verdana; color:#FFFFFF; background-color: #4285F4; font-size:12pt; " size="33" name="horloge">
     <p></p>
    	<p>
     <input id="horlogeL" readonly="readonly" style="border:1px solid grey; border-radius:2px; text-align:center; font-family:Verdana; color:#0000FF; font-size:12pt; " size="33" name="horlogeL">
     </p>
     	<div id="liens" style="width: 346px; height: 237px">
     	Autres sources:
     	<p><a href="Meteo-Consorzio-Lamma.html">Consorsio Lamma</a></p>
    	<p><a href="Meteorama.meteo.marine.html">Météorama météo marine</a></p>
    	<p><a href="Meteorama.pression.atmospherique.html">Météorama pression atmosphérique</a></p>
    	</div>
     
    </div></body></html>

  9. #9
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    Place toutes tes initialisations dans ton
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    window.onload = function() {
        initInputonload();
        raz();
        heure();
        heureL();
    };
    et supprime ton onload dans le <body>.
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <body onload="initInputonload();raz()"...

    PS : profites en pour supprimer tout ton CSS des balises.

  10. #10
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2016
    Messages
    83
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Mars 2016
    Messages : 83
    Par défaut
    Merci beaucoup.
    Voilà qui est beaucoup plus propre.
    Merci de votre aide.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 3
    Dernier message: 27/11/2011, 15h42
  2. Réponses: 1
    Dernier message: 16/11/2010, 14h25
  3. Réponses: 5
    Dernier message: 17/12/2008, 14h18
  4. Script qui ne fonctionne pas sous IE7
    Par carbaba dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 23/01/2008, 22h50
  5. [CSS] Effet de hover qui ne fonctionne pas sous IE
    Par Ricou13 dans le forum Mise en page CSS
    Réponses: 6
    Dernier message: 14/06/2005, 09h39

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo