Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<html>
<head>
<style type="text/css">
#div4e {
width:160px;
border:0px solid red;
margin-left:auto;
margin-right:auto;
background-color:darkblue;
color:white;
font-weight:bold;
font-size:40px;
}
</style>
<script type="text/javascript">
function chas(){
var vreme= new Date();
var hh = vreme.getHours();
var mm = vreme.getMinutes();
var ss = vreme.getSeconds();
if( hh <=9 ) hh = "0"+hh;
if( mm <=9 ) mm = "0"+mm;
if( ss <=9 ) ss = "0"+ss;
document.getElementById('div4e').innerHTML= hh+":"+mm+":"+ss;
window.setTimeout("chas()",1000);
}
</script>
<head>
<body onLoad="chas()">
<div id="div4e">
</div>
</body>
</html>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>4asovnik by Zion</title>
<style>
</style>
</head>
<body>
<span id="digitalclock" class="styling"></span>
<script>
var alternate=0
var standardbrowser=!document.all&&!document.getElementById
if (standardbrowser)
document.write('<form name="tick"><input type="text" name="tock" size="11"></form>')
function show(){
if (!standardbrowser)
var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var dn="AM"
if (hours==12) dn="PM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0) hours=12
if (hours.toString().length==1)
hours="0"+hours
if (minutes<=9)
minutes="0"+minutes
if (standardbrowser){
if (alternate==0)
document.tick.tock.value=hours+" : "+minutes+" "+dn
else
document.tick.tock.value=hours+" "+minutes+" "+dn
}
else{
if (alternate==0)
clockobj.innerHTML=hours+"<font color='lime'> : </font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
else
clockobj.innerHTML=hours+"<font color='black'> : </font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
}
alternate=(alternate==0)? 1 : 0
setTimeout("show()",1000)
}
window.onload=show
</script>
</body>
</html>