tutorial:cum pun ceas pe site/bloag/forum
Pagina 1 din 1 • Impartiti •
tutorial:cum pun ceas pe site/bloag/forum
in acest tutorial va voi explica cum puneti ceas pe forum/bloag/site.
COPIATI CODUL DE MAI JOS
pe care al inserati intr-un editor html al paginii sau in sursa ei. SUCCES!
pt nelamuriri postati aici!
COPIATI CODUL DE MAI JOS
- Cod:
<html>
<head>
<script language="JavaScript">
var clockid = new Array()
var clockidoutside = new Array()
var i_clock = -1
var thistime = new Date()
var hours = thistime.getHours()
var minutes = thistime.getMinutes()
var seconds = thistime.getSeconds()
if (hours < 10) {hours = "0" + hours}
if (minutes < 10) {minutes = "0" + minutes}
if (seconds < 10) {seconds="0" + seconds}
var thistime = hours + ":" + minutes + ":" + seconds
function ceas()
{
i_clock++
if (document.all || document.getElementById || document.layers)
{
clockid[i_clock] = "clock" + i_clock
document.write("<span id='"+clockid[i_clock]+"' style='position:relative'>"+thistime+"</span>")
}
}
function clockon()
{
thistime = new Date()
hours = thistime.getHours()
minutes = thistime.getMinutes()
seconds = thistime.getSeconds()
if (hours < 10) {hours = "0" + hours}
if (minutes < 10) {minutes = "0" + minutes}
if (seconds < 10) {seconds = "0" + seconds}
thistime = hours + ":" + minutes + ":" + seconds
if (document.all)
{ for (i=0; i<=clockid.length-1; i++)
{ var thisclock = clockid[i]
thisclock.innerHTML = thistime
}
}
if (document.getElementById)
{ for (i=0; i<=clockid.length-1; i++)
{ document.getElementById(clockid[i]).innerHTML = thistime }
}
var timer = setTimeout("clockon()",1000)
}
window.onload = clockon
</script>
</head>
<body>
<div style="position: absolute; left: 150px; top: 152px; font-size: 25px; color: pink;">
Ora setatã pe PC-ul dv. este: <script language="JavaScript">ceas()</script>
</div>
</body>
</html>
pe care al inserati intr-un editor html al paginii sau in sursa ei. SUCCES!
pt nelamuriri postati aici!

Admin- Admin
- Mesaje: 9
Data de inscriere: 26/02/2011

Subiecte similare» Mecanism de ceas
» Tutorial "cum adaugam mod" pentru masina/weapon
» Descriere site
» Launching In 2 Days : The New Site
» Site-uri cu theme phpbb3
» Tutorial "cum adaugam mod" pentru masina/weapon
» Descriere site
» Launching In 2 Days : The New Site
» Site-uri cu theme phpbb3
Pagina 1 din 1
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum