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 :

modification de script


Sujet :

JavaScript

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2005
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2005
    Messages : 16
    Points : 5
    Points
    5
    Par défaut modification de script
    bonjour je voulais faire des nouvelles creations sur mon site pour theme des horloges j ai donc trouver un scrypt deja j ai eu du mal car il ce place toujours a la meme place j ai du donc trouver les valeurs a changer pour le placer ou je veut ça j ai trouver par contre les chiffres ne se voit pas trop donc pouvez vous me dire la ligne que je doit changer pour modifier la police exemple en gras et la taille merci voici le 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
    //Les couleurs :
    fCol='7777BB'; //couleur des chiffres.
    sCol='9999FF'; //couleur des secondes.
    mCol='666699'; //couleur des minutes.
    hCol='000066'; //couleur des heures.
     
    //position en absolut :
    Xoff=47; //à gauche
    Yoff=188; //en haut
     
    //taille
    Ybase=34; //hauteur
    Xbase=34; //largeur
     
    //raffraichissement :
    refr=1000;
     
     
    //ne pas modifier ci-après :
     
    H='...';
    H=H.split('');
    M='....';
    M=M.split('');
    S='.....';
    S=S.split('');
    NS4=(document.layers);
    NS6=(document.getElementById&&!document.all);
    IE4=(document.all);
    Ypos=0;
    Xpos=0;
    dots=12;
    Split=360/dots;
    if (NS6){
    for (i=1; i < dots+1; i++){
    document.write('<div id="n6Digits'+i+'" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:#'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
    }
    for (i=0; i < M.length; i++){
    document.write('<div id="Ny'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+mCol+'"></div>');
    }
    for (i=0; i < H.length; i++){
    document.write('<div id="Nz'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+hCol+'"></div>');
    }
    for (i=0; i < S.length; i++){
    document.write('<div id="Nx'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+sCol+'"></div>');
    }
    }
    if (NS4){
    dgts='1 2 3 4 5 6 7 8 9 10 11 12';
    dgts=dgts.split(' ')
    for (i=0; i < dots; i++){
    document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial size=1 color='+fCol+'>'+dgts[i]+'</font></center></layer>');
    }
    for (i=0; i < M.length; i++){
    document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
    }
    for (i=0; i < H.length; i++){
    document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
    }
    for (i=0; i < S.length; i++){
    document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
    }
    }
    if (IE4){
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=1; i < dots+1; i++){
    document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < M.length; i++){
    document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < H.length; i++){
    document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < S.length; i++){
    document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
    }
    document.write('</div></div>')
    }
     
     
     
    function clock(){
    time = new Date ();
    secs = time.getSeconds();
    sec = -1.57 + Math.PI * secs/30;
    mins = time.getMinutes();
    min = -1.57 + Math.PI * mins/30;
    hr = time.getHours();
    hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;
     
    if (NS6){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=1; i < dots+1; i++){
    document.getElementById("n6Digits"+i).style.top=Ypos-15+Ybase*Math.sin(-1.56 +i *Split*Math.PI/180)
    document.getElementById("n6Digits"+i).style.left=Xpos-15+Xbase*Math.cos(-1.56 +i*Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    document.getElementById("Nx"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(sec);
    document.getElementById("Nx"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    document.getElementById("Ny"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(min);
    document.getElementById("Ny"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    document.getElementById("Nz"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(hrs);
    document.getElementById("Nz"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
    if (NS4){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=0; i < dots; ++i){
    document.layers["nsDigits"+i].top=Ypos-5+Ybase*Math.sin(-1.045 +i*Split*Math.PI/180)
    document.layers["nsDigits"+i].left=Xpos-15+Xbase*Math.cos(-1.045 +i*Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    document.layers["nx"+i].top=Ypos+i*Ybase/4.1*Math.sin(sec);
    document.layers["nx"+i].left=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    document.layers["ny"+i].top=Ypos+i*Ybase/4.1*Math.sin(min);
    document.layers["ny"+i].left=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    document.layers["nz"+i].top=Ypos+i*Ybase/4.1*Math.sin(hrs);
    document.layers["nz"+i].left=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
     
    if (IE4){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=0; i < dots; ++i){
    ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)
    ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);
    x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);
    y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);
    z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
    setTimeout('clock()',refr);
    }
    clock();

  2. #2
    Expert éminent sénior
    Avatar de Auteur
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    7 650
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 7 650
    Points : 11 143
    Points
    11 143
    Par défaut
    bonjour,

    Ton code date un peu...mais ce n'est pas grave, il fonctionne sous IE et Firefox.

    Il faut simplement que tu recherches la variable fCol (la couleur des chiffres). Modifie ensuite la valeur font-family, pour la police, font-size pour la taille (prévilégie le point -pt- comme unité plutôt que le pixel -px-). Pour les autres styles :
    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    /*gras */
    font-weight: bold; /* ou normal */
    /* souligne */
    text-decoration: underline; /* ou none */
    /* italique */
    font-style: italic; /* ou normal*/


    J'ai mis en bleu les lignes à modifier
    Code javascript : 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
    <!--
     //Les couleurs :
    fCol='7777BB'; //couleur des chiffres.
    sCol='9999FF'; //couleur des secondes.
    mCol='666699'; //couleur des minutes.
    hCol='000066'; //couleur des heures.
    
    //position en absolut :
    Xoff=47; //à gauche
    Yoff=188; //en haut
    
    //taille
    Ybase=34; //hauteur
    Xbase=34; //largeur
    
    //raffraichissement :
    refr=1000;
    
    
    //ne pas modifier ci-après :
    
    H='...';
    H=H.split('');
    M='....';
    M=M.split('');
    S='.....';
    S=S.split('');
    NS4=(document.layers);
    NS6=(document.getElementById&&!document.all);
    IE4=(document.all);
    Ypos=0;
    Xpos=0;
    dots=12;
    Split=360/dots;
    if (NS6){
    for (i=1; i < dots+1; i++){
    document.write('<div id="n6Digits'+i+'" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:#'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
    }
    for (i=0; i < M.length; i++){
    document.write('<div id="Ny'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+mCol+'"></div>');
    }
    for (i=0; i < H.length; i++){
    document.write('<div id="Nz'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+hCol+'"></div>');
    }
    for (i=0; i < S.length; i++){
    document.write('<div id="Nx'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+sCol+'"></div>');
    }
    }
    if (NS4){
    dgts='1 2 3 4 5 6 7 8 9 10 11 12';
    dgts=dgts.split(' ')
    for (i=0; i < dots; i++){
    document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial size=10 color='+fCol+'>'+dgts[i]+'</font></center></layer>');
    }
    for (i=0; i < M.length; i++){
    document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
    }
    for (i=0; i < H.length; i++){
    document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
    }
    for (i=0; i < S.length; i++){
    document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
    }
    }
    if (IE4){
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=1; i < dots+1; i++){
    document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < M.length; i++){
    document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < H.length; i++){
    document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < S.length; i++){
    document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
    }
    document.write('</div></div>')
    }
    
    
    
    function clock(){
    time = new Date ();
    secs = time.getSeconds();
    sec = -1.57 + Math.PI * secs/30;
    mins = time.getMinutes();
    min = -1.57 + Math.PI * mins/30;
    hr = time.getHours();
    hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;
    
    if (NS6){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=1; i < dots+1; i++){
    document.getElementById("n6Digits"+i).style.top=Ypos-15+Ybase*Math.sin(-1.56 +i *Split*Math.PI/180)
    document.getElementById("n6Digits"+i).style.left=Xpos-15+Xbase*Math.cos(-1.56 +i*Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    document.getElementById("Nx"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(sec);
    document.getElementById("Nx"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    document.getElementById("Ny"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(min);
    document.getElementById("Ny"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    document.getElementById("Nz"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(hrs);
    document.getElementById("Nz"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
    if (NS4){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=0; i < dots; ++i){
    document.layers["nsDigits"+i].top=Ypos-5+Ybase*Math.sin(-1.045 +i*Split*Math.PI/180)
    document.layers["nsDigits"+i].left=Xpos-15+Xbase*Math.cos(-1.045 +i*Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    document.layers["nx"+i].top=Ypos+i*Ybase/4.1*Math.sin(sec);
    document.layers["nx"+i].left=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    document.layers["ny"+i].top=Ypos+i*Ybase/4.1*Math.sin(min);
    document.layers["ny"+i].left=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    document.layers["nz"+i].top=Ypos+i*Ybase/4.1*Math.sin(hrs);
    document.layers["nz"+i].left=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
    
    if (IE4){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=0; i < dots; ++i){
    ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)
    ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);
    x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);
    y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);
    z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
    setTimeout('clock()',refr);
    }
    clock();

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2005
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2005
    Messages : 16
    Points : 5
    Points
    5
    Par défaut
    merci pour ton aide tu dis que mon scrypt date un peut ,aurai tu un scrypt avec une horloge de ce genre mais plus recent et plus facile a modifier car la j ai modifier la taille dans size et la police et rien ne change ou alors je me plante pourrais tu sinon stp le modifier je veut mettre un texture gras comme par exemple Arial Black et mettre une taille a 15 merci infiniment de ton aide

  4. #4
    Expert éminent sénior
    Avatar de Auteur
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    7 650
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 7 650
    Points : 11 143
    Points
    11 143
    Par défaut
    avec font=Arial Black, taille = 15pt, en gras
    Code html : 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
     
    <html>
    <head>
    <title></title>
     
    <script type="text/javascript">
    <!--
     
     //Les couleurs :
    fCol='7777BB'; //couleur des chiffres.
    sCol='9999FF'; //couleur des secondes.
    mCol='666699'; //couleur des minutes.
    hCol='000066'; //couleur des heures.
     
    //position en absolut :
    Xoff=47; //à gauche
    Yoff=188; //en haut
     
    //taille
    Ybase=34; //hauteur
    Xbase=34; //largeur
     
    //raffraichissement :
    refr=1000;
     
     
    //ne pas modifier ci-après :
     
    H='...';
    H=H.split('');
    M='....';
    M=M.split('');
    S='.....';
    S=S.split('');
    NS4=(document.layers);
    NS6=(document.getElementById&&!document.all);
    IE4=(document.all);
    Ypos=0;
    Xpos=0;
    dots=12;
    Split=360/dots;
    if (NS6){
    for (i=1; i < dots+1; i++){
    document.write('<div id="n6Digits'+i+'" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family: Arial Black;font-size:15pt; color:#'+fCol+';text-align:center;padding-top:10px"><b>'+i+'</b></div>');
    }
    for (i=0; i < M.length; i++){
    document.write('<div id="Ny'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+mCol+'"></div>');
    }
    for (i=0; i < H.length; i++){
    document.write('<div id="Nz'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+hCol+'"></div>');
    }
    for (i=0; i < S.length; i++){
    document.write('<div id="Nx'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+sCol+'"></div>');
    }
    }
    if (NS4){
    dgts='1 2 3 4 5 6 7 8 9 10 11 12';
    dgts=dgts.split(' ')
    for (i=0; i < dots; i++){
    document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=\"Arial Black\" size=10 color='+fCol+'><b>'+dgts[i]+'</b></font></center></layer>');
    }
    for (i=0; i < M.length; i++){
    document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
    }
    for (i=0; i < H.length; i++){
    document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
    }
    for (i=0; i < S.length; i++){
    document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
    }
    }
    if (IE4){
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=1; i < dots+1; i++){
    document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial Black;font-size:15pt;color:'+fCol+';text-align:center;padding-top:10px"><b>'+i+'</b></div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < M.length; i++){
    document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < H.length; i++){
    document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
    }
    document.write('</div></div>')
    document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < S.length; i++){
    document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
    }
    document.write('</div></div>')
    }
     
     
     
    function clock(){
    time = new Date ();
    secs = time.getSeconds();
    sec = -1.57 + Math.PI * secs/30;
    mins = time.getMinutes();
    min = -1.57 + Math.PI * mins/30;
    hr = time.getHours();
    hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;
     
    if (NS6){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=1; i < dots+1; i++){
    document.getElementById("n6Digits"+i).style.top=Ypos-15+Ybase*Math.sin(-1.56 +i *Split*Math.PI/180)
    document.getElementById("n6Digits"+i).style.left=Xpos-15+Xbase*Math.cos(-1.56 +i*Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    document.getElementById("Nx"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(sec);
    document.getElementById("Nx"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    document.getElementById("Ny"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(min);
    document.getElementById("Ny"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    document.getElementById("Nz"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(hrs);
    document.getElementById("Nz"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
    if (NS4){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=0; i < dots; ++i){
    document.layers["nsDigits"+i].top=Ypos-5+Ybase*Math.sin(-1.045 +i*Split*Math.PI/180)
    document.layers["nsDigits"+i].left=Xpos-15+Xbase*Math.cos(-1.045 +i*Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    document.layers["nx"+i].top=Ypos+i*Ybase/4.1*Math.sin(sec);
    document.layers["nx"+i].left=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    document.layers["ny"+i].top=Ypos+i*Ybase/4.1*Math.sin(min);
    document.layers["ny"+i].left=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    document.layers["nz"+i].top=Ypos+i*Ybase/4.1*Math.sin(hrs);
    document.layers["nz"+i].left=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
     
    if (IE4){
    Ypos=Yoff;
    Xpos=Xoff;
    for (i=0; i < dots; ++i){
    ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)
    ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)
    }
    for (i=0; i < S.length; i++){
    x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);
    x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);
    }
    for (i=0; i < M.length; i++){
    y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);
    y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);
    }
    for (i=0; i < H.length; i++){
    z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);
    z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);
    }
    }
    setTimeout('clock()',refr);
    }
    clock();
     
    //-->
    </script>
     
    </head>
     
    <body>
     
     
     
    </body>
     
    </html>


    tu dis que mon scrypt date un peut ,aurai tu un scrypt avec une horloge de ce genre mais plus recent et plus facile a modifier
    Non désolé, je n'ai, pour l'instant, pas ce genre de script en stock

Discussions similaires

  1. Menu horizontal multi level, modif de script
    Par WeDgEMasTeR dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 22/12/2007, 14h53
  2. [phpBB] Modification du script register phpBB
    Par warwill dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 6
    Dernier message: 12/12/2007, 16h39
  3. Modification de script
    Par tinoudu01 dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 12/06/2007, 13h42
  4. [eCommerce] Modification de scripts e-commerce
    Par DavidN90 dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 1
    Dernier message: 03/03/2007, 00h31
  5. Aide pour modification de script
    Par cryptorchild dans le forum Langage
    Réponses: 3
    Dernier message: 04/10/2005, 15h59

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