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
| <HTML>
<HEAD>
<TITLE> heure universelle actuelle (UTC) </TITLE>
<HTA:APPLICATION
ApplicationName = "DateHeureUTC"
Id="DateHeureUTC"
>
</HEAD>
<SCRIPT language="VBScript" type="text/VBScript" >
'------------------------------------------------------------------------------------------------------------------
dim MonTimer
'------------------------------------------------------------------------------------------------------------------
Sub Window_Onload()
BoiteVisuHeure.innerText = FormatDateTime(UTCTimeDemo(s),vbLongTime)
BoiteVisuDate.innerText = FormatDateTime(UTCDateDemo(s),vbLongDate)
BoiteHeureSystem.innerText = FormatDateTime(Time,vbLongTime)
StartTimer
End Sub
'------------------------------------------------------------------------------------------------------------------
Sub Window_onUnLoad()
If GoActu.Value = "Arreter" then StopTimer
Set MonTimer = Nothing
End Sub
'------------------------------------------------------------------------------------------------------------------
Sub StartTimer
MonTimer = window.setInterval ("Actualis", 1000, "VBScript") 'Appel de Actualis toutes les secondes
End sub
'------------------------------------------------------------------------------------------------------------------
Sub StopTimer
window.ClearInterval MonTimer
end sub
'------------------------------------------------------------------------------------------------------------------
Sub Actualis()
BoiteVisuHeure.innerText = FormatDateTime(UTCTimeDemo(s),vbLongTime)
BoiteVisuDate.innerText = FormatDateTime(UTCDateDemo(s),vbLongDate)
BoiteHeureSystem.innerText = FormatDateTime(Time,vbLongTime)
End Sub
'------------------------------------------------------------------------------------------------------------------
Sub GoActu_onClick
If GoActu.Value = "Reprendre" then
GoActu.Value = "Arreter"
StartTimer
Else
StopTimer
GoActu.Value = "Reprendre"
End if
End sub
'------------------------------------------------------------------------------------------------------------------
Sub GoParler_onClick
Dim Voix
Set Voix = CreateObject("SAPI.SpVoice")
Voix.Speak BoiteVisuDate.innerText
Set Voix = NotHing ' Nettoyage
End sub
'------------------------------------------------------------------------------------------------------------------
</SCRIPT>
<SCRIPT language="javaScript" type="text/javaScript" >
function UTCDateDemo()
{
var d, s;
d = new Date();
s = d.getUTCDate() + "/";
s += (d.getUTCMonth() + 1) + "/";
s += d.getUTCFullYear();
return(s);
}
function UTCTimeDemo()
{
var d, s;
var c = ":";
d = new Date();
s = d.getUTCHours() + c;
s += d.getUTCMinutes() + c;
s += d.getUTCSeconds();
return(s);
}
</SCRIPT>
<Body>
<Div STYLE="color:#000000; position:absolute; left:10px; top:10px; height:13px; width:140px"> Date et heure UTC </Div>
<INPUT Type="button" name="GoActu" value="Arreter" STYLE="color:#000095; position:absolute; left:160px; top:6px; height:26px; width:80px">
<Div STYLE="color:#000000; position:absolute; left:10px; top:40px; height:13px; width:37px"> Il est </Div>
<Div Id="BoiteVisuHeure" STYLE="color:#000095; position:absolute; left:60px; top:40px; height:13px; width:60px"> </Div>
<Div STYLE="color:#000000; position:absolute; left:132px; top:40px; height:13px; width:120px"> nous sommes le </Div>
<Div Id="BoiteVisuDate" STYLE="color:#000095; position:absolute; left:256px; top:40px; height:13px; width:200px"> </Div>
<Div STYLE="color:#000000; position:absolute; left:10px; top:70px; height:13px; width:140px"> Heure système </Div>
<Div Id="BoiteHeureSystem" STYLE="color:#000095; position:absolute; left:60px; top:100px; height:13px; width:60px"> 21:04:50 </Div>
<INPUT Type="button" name="GoParler" value="Lire" STYLE="color:#000095; position:absolute; left:10px; top:160px; height:26px; width:80px">
</Body>
</HTML> |