The code is very simple. You can copy the following code and save it as an HTML file.
Copy codeThe Code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head> <Body>
<Script language = "javascript">
Function Change (HourSurplus, MinuteSurplus, SecondSurplus)
{
SecondSurplus = SecondSurplus-1;
If (SecondSurplus <0)
{
SecondSurplus = 60 + SecondSurplus;
MinuteSurplus = MinuteSurplus-1;
}
If (MinuteSurplus <0)
{
MinuteSurplus = 60 + MinuteSurplus;
HourSurplus = HourSurplus-1;
}
Document. getElementById ("asd"). innerHTML = "" + HourSurplus + ":" + MinuteSurplus + ":" + SecondSurplus + "";
SetTimeout (function (){
Change (HourSurplus, MinuteSurplus, SecondSurplus );
},1000 );
}
</Script>
& Lt; span id = "asd" & gt; 11111 & lt;/span & gt;
<Script language = "javascript">
Change (1, 59, 59 );
</Script>
</Body>
</Html>