Краслава Портал

Объявление

Внимание! Бонус за регистрацию 0,01 WMZ! Возможность заработать более 5,12 WMZ просто будучи участником форума! Подробнее здесь.

Всем бонус 0,1$ в этой теме!

Открыта реферральная программа! Подробнее читаем здесь.

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Краслава Портал » Скрипты » Часы и таймеры


Часы и таймеры

Сообщений 1 страница 14 из 14

1

новая тема. Здесь можно выкладывать скрипты различных часов и таймеров.

0

2

например Таймер который показывает время работы на странице:

Код:
<script language=JavaScript type=text/javascript>
<!--
var startDate = new Date();
function timer() {
var theDate = new Date();
var differ = theDate - startDate;
var hours, minutes, seconds;
hours = Math.floor(differ/(1000*60*60));
hours = (hours > 60) ? hours%60 : hours;
hours = (hours < 10) ? "0" + hours : hours;

minutes = Math.floor(differ/(1000*60));
minutes = (minutes > 60) ? minutes%60 : minutes;
minutes = (minutes < 10) ? "0" + minutes : minutes;

seconds = Math.round(differ/1000);
seconds = (seconds > 60) ? seconds%60 : seconds;
seconds = (seconds < 10) ? "0" + seconds : seconds;

var strDate =  hours + ":" + minutes + ":" + seconds;
document.forms['timerForm'].timerBox.value=strDate;
setTimeout("timer()", 1000);}
//-->
</script>
</head>
<body onload=timer()>
<form name=timerForm>Вы работаете со страницей <input size=6 name=timerBox></form>

0

3

Krait   Спасибо не прям то что искал но тоже подойдет....

:)

0

4

Скромненькие часики в input (ч/м/с)

Код:
<body bgcolor=white>
<title>http://bjs.stsland.ru/ - Áàçà ßâà Ñêðèïòîâ (bjs)</title>

<script language="JavaScript">
<!-- Hide the script from old browsers --
var timerID = null
var timerRunning = false

function stopclock(){
    if(timerRunning)
    clearTimeout(timerID)
    timerRunning = false
}

function startclock(){
    stopclock()
    showtime()
}

function showtime(){
    var now = new Date()
    var hours = now.getHours()
    var minutes = now.getMinutes()
    var seconds = now.getSeconds()
    var timeValue = "" + ((hours > 12) ? hours - 12 : hours)
    var timeValue1 = "" + ((hours < 10) ? "0" : "") + hours
    timeValue  += ((minutes < 10) ? ":0" : ":") + minutes
    timeValue1 += ((minutes < 10) ? ":0" : ":") + minutes
    timeValue  += ((seconds < 10) ? ":0" : ":") + seconds
    timeValue1 += ((seconds < 10) ? ":0" : ":") + seconds
    timeValue  += (hours >= 12) ? " P.M." : " A.M."
    document.clock.face.value = timeValue
    document.clock.face.value = timeValue1; 
    timerID = setTimeout("showtime()",1000)
    timerRunning = true
}
// -- End Hiding Here -->
</script>
<body onLoad="startclock()">
<center>
<form name="clock" onSubmit="0">
<input type="text" name="face" size=8 value="">
</form></center>

0

5

Часики, показывающие Время, месяц, число, год

Код:
<body bgcolor=white>
<title>http://bjs.stsland.ru/ - Áàçà ßâà Ñêðèïòîâ (bjs)</title>


 <SCRIPT LANGUAGE="JavaScript">
 
 
         var now = new Date();
         var hours = now.getHours();
         var minutes = now.getMinutes();
         var timeValue = "" + ((hours >12) ? hours -12 :hours)
         timeValue += ((minutes < 10) ? ":0" : ":") + minutes
         timeValue += (hours >= 12) ? " P.M." : " A.M."
         timerRunning = true;
 
 
      mydate = new Date();
      myday = mydate.getDay();
      mymonth = mydate.getMonth();
      myweekday= mydate.getDate();
      weekday= myweekday;
      myyear= mydate.getYear();
      year = myyear
 
      if(myday == 0)
              day = " Sunday, "      
 
      else if(myday == 1)
            day = " Monday, "
 
      else if(myday == 2)
              day = " Tuesday, "   
 
      else if(myday == 3)
              day = " Wednesday, "   
 
      else if(myday == 4)
              day = " Thursday, "
 
      else if(myday == 5)
              day = " Friday, "
 
      else if(myday == 6)
              day = " Saturday, "
 
      if(mymonth == 0)
               month = "January "
 
      else if(mymonth ==1)
               month = "February "
 
      else if(mymonth ==2)
              month = "March "
 
      else if(mymonth ==3)
             month = "April "
 
      else if(mymonth ==4)
               month = "May "
 
      else if(mymonth ==5)
               month = "June "
 
      else if(mymonth ==6)
               month = "July "
 
      else if(mymonth ==7)
             month = "August "
 
      else if(mymonth ==8)
            month = "September "
 
      else if(mymonth ==9)
           month = "October "
 
      else if(mymonth ==10)
           month = "November "
 
      else if(mymonth ==11)
           month = "December"
 
      document.write("<B><P ALIGN=RIGHT><FONT SIZE=-1 FACE=VERDANA,ARIAL>" + timeValue + " | " +day + month);
      document.write(myweekday+","+ " " + year + "</FONT></B><BR><HR WIDTH=300 ALIGN=RIGHT><P>");
 
 </SCRIPT>

0

6

Красивые часики в нижнем углу!

Код:
<html>
<head>
<title>http://bjs.stsland.ru/ - Áàçà ßâà Ñêðèïòîâ (bjs)</title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
 <Style>
   A:Link{ Color: #000000; Text-decoration: underline}
   A:Visited{ Color: #000000; Text-decoration: underline}
   A:Hover{ Color: #000000; Text-decoration: none}
 td, body {font-family: verdana, arial, helvetica; font-size:11px;}  
 </Style>

<!-- HEAD START HERE -->

 <SCRIPT LANGUAGE="JavaScript">
 <!-- Original:  Kurt Grigg (kurt.grigg@virgin.net) -->
 <!-- Web Site:  http://website.lineone.net/~kurt.grigg/javascript -->
 
 <!-- This script and many more are available free online at -->
 <!-- The JavaScript Source!! http://javascript.internet.com -->
 
 <!-- Begin
 fCol = '000000';  //face colour.
 sCol = 'ff0000';  //seconds colour.
 mCol = 'blue';  //minutes colour.
 hCol = 'green';  //hours colour.
 H = '....';
 H = H.split('');
 M = '.....';
 M = M.split('');
 S = '......';
 S = S.split('');
 Ypos = 0;
 Xpos = 0;
 Ybase = 8;
 Xbase = 8;
 dots = 12;
 ns = (document.layers)?1:0;
 if (ns) {
 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,Verdana 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>');
    }
 }
 else {
 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,Verdana;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></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 (ns) {
 Ypos = window.pageYOffset+window.innerHeight-60;
 Xpos = window.pageXOffset+window.innerWidth-80;
 }
 else {
 Ypos = document.body.scrollTop + window.document.body.clientHeight - 60;
 Xpos = document.body.scrollLeft + window.document.body.clientWidth - 60;
 }
 if (ns) {
 for (i = 0; i < dots; ++i){
 document.layers["nsDigits"+i].top = Ypos - 5 + 40 * Math.sin(-0.49+dots+i/1.9);
 document.layers["nsDigits"+i].left = Xpos - 15 + 40 * Math.cos(-0.49+dots+i/1.9);
 }
 for (i = 0; i < S.length; i++){
 document.layers["nx"+i].top = Ypos + i * Ybase * Math.sin(sec);
 document.layers["nx"+i].left = Xpos + i * Xbase * Math.cos(sec);
 }
 for (i = 0; i < M.length; i++){
 document.layers["ny"+i].top = Ypos + i * Ybase * Math.sin(min);
 document.layers["ny"+i].left = Xpos + i * Xbase * Math.cos(min);
 }
 for (i = 0; i < H.length; i++){
 document.layers["nz"+i].top = Ypos + i * Ybase * Math.sin(hrs);
 document.layers["nz"+i].left = Xpos + i * Xbase * Math.cos(hrs);
    }
 }
 else{
 for (i=0; i < dots; ++i){
 ieDigits[i].style.pixelTop = Ypos - 15 + 40 * Math.sin(-0.49+dots+i/1.9);
 ieDigits[i].style.pixelLeft = Xpos - 14 + 40 * Math.cos(-0.49+dots+i/1.9);
 }
 for (i=0; i < S.length; i++){
 x[i].style.pixelTop = Ypos + i * Ybase * Math.sin(sec);
 x[i].style.pixelLeft = Xpos + i * Xbase * Math.cos(sec);
 }
 for (i=0; i < M.length; i++){
 y[i].style.pixelTop = Ypos + i * Ybase * Math.sin(min);
 y[i].style.pixelLeft = Xpos + i * Xbase * Math.cos(min);
 }
 for (i=0; i < H.length; i++){
 z[i].style.pixelTop = Ypos + i * Ybase*Math.sin(hrs);
 z[i].style.pixelLeft = Xpos + i * Xbase*Math.cos(hrs);
    }
 }
 setTimeout('clock()', 50);
 }
 if (document.layers || document.all) window.onload = clock;
 //  End -->
 </script>

<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0">
<center>

<!-- BODY START HERE -->



<!-- BODY END HERE -->

<p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>
 <p align="center">&nbsp;</p>

</body>
</html>

0

7

Графические часы (am/pm)!

Код:
<title>http://bjs.stsland.ru/ - Áàçà ßâà Ñêðèïòîâ (bjs)</title>
<body bgcolor=#333399>
<p align=center>
<font color=#fffccc face=verdana size=3>Ãðàôè÷åñêèå ÷àñû
<br><br>
<script language="JavaScript">
<!--                                    	
var digit = new Array()
digit[0] = new Image(16, 21) 
digit[1] = new Image(16, 21) 
digit[2] = new Image(16, 21) 
digit[3] = new Image(16, 21) 
digit[4] = new Image(16, 21)	
digit[5] = new Image(16, 21)
digit[6] = new Image(16, 21)
digit[7] = new Image(16, 21)
digit[8] = new Image(16, 21)
digit[9] = new Image(16, 21)
digit[10] = new Image(16, 21) // am
digit[11] = new Image(16, 21) // pm
digit[12] = new Image(9, 21) // colon
digit[13] = new Image(9, 21) // blank

// assign sources to digit image objects (0 - 9)
for (var i = 0; i < 10; ++i) {
	digit[i].src = getPath(location.href) + "dg" + i + ".gif"
}

// assign sources to other image objects
digit[10].src = getPath(location.href) + "dgam.gif"
digit[11].src = getPath(location.href) + "dgpm.gif"
digit[12].src = getPath(location.href) + "dgc.gif"
digit[13].src = getPath(location.href) + "dgb.gif"

// set initial time values to impossible ones	
var hour1 = getHour(0)
var hour2 = getHour(1)
var minute1 = getMinute(0)
var minute2 = getMinute(1)
var ampm = getAmpm()
var colon = false 

// get array substring of first clock image in document.images array
var start = document.images.length // number of images in document

// print initial clock
var openImage = "<IMG SRC=\"" + getPath(location.href) + "dg"
var closeImage = ".gif\" HEIGHT=21 WIDTH=16>"
document.write(openImage + hour1 + closeImage)
document.write(openImage + hour2 + closeImage)
document.write(openImage + "c.gif\" HEIGHT=21 WIDTH=9>")
document.write(openImage + minute1 + closeImage)
document.write(openImage + minute2 + closeImage)
document.write(openImage + ((ampm == 10) ? "am" : "pm") + closeImage)

var timerID = null
var timerRunning = false

update()

function setClock() {
	if (getHour(0) != hour1) { // not getHours()!
hour1 = getHour(0)
document.images[start].src = digit[hour1].src
	} 
	if (getHour(1) != hour2) { // not getHours()!
hour2 = getHour(1)
document.images[start + 1].src = digit[hour2].src
	} 
	colon = !colon
	if (!colon)
document.images[start + 2].src = digit[13].src
	else
document.images[start + 2].src = digit[12].src
	if (getMinute(0) != minute1) { // not getMinutes()!
minute1 = getMinute(0)
document.images[start + 3].src = digit[minute1].src
	}
	if (getMinute(1) != minute2) { // not getMinutes()!
minute2 = getMinute(1)
document.images[start + 4].src = digit[minute2].src
	}
	if (getAmpm() != ampm) {
ampm = getAmpm()
document.images[start + 5].src = digit[ampm].src
	}
	timerID = setTimeout("setClock()",1000)
  	timerRunning = true
}

function update() {
	stopClock()
	setClock()
}

function stopClock() {
if (timerRunning)
clearTimeout(timerID)
timerRunning = false
}

function getHour(place) {
	var now = new Date()
	var hour = now.getHours()
	if (hour >= 12)
hour -= 12
	hour = (hour == 0) ? 12 : hour
	if (hour < 10)
hour = "0" + hour // do not parse number!
	hour += ""
	return parseInt(hour.charAt(place))
}

function getMinute(place) {
	var now = new Date()
	var minute = now.getMinutes()
	if (minute < 10)
minute = "0" + minute // do not parse number!
	minute += ""
	return parseInt(minute.charAt(place))
}

function getAmpm() {
	var now = new Date()
	var hour = now.getHours()
	if (hour >= 12)
return 11 // pm
	/* else */
return 10 // am
}

function getPath(url) {
	lastSlash = url.lastIndexOf("/")
	return url.substring(0, lastSlash + 1)
}

// -->
</script>

0

8

Красивые графические часы!

Код:
<html>
<head>
<title>http://bjs.stsland.ru/ - Áàçà ßâà Ñêðèïòîâ (bjs)</title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
 <Style>
   A:Link{ Color: #000000; Text-decoration: underline}
   A:Visited{ Color: #000000; Text-decoration: underline}
   A:Hover{ Color: #000000; Text-decoration: none}
 td, body {font-family: verdana, arial, helvetica; font-size:11px;}  
 </Style>

<!-- HEAD START HERE -->


<Script Language="JavaScript1.1">
  var dn
  c1=new Image(); c1.src="c1.gif"
  c2=new Image(); c2.src="c2.gif"
  c3=new Image(); c3.src="c3.gif"
  c4=new Image(); c4.src="c4.gif"
  c5=new Image(); c5.src="c5.gif"
  c6=new Image(); c6.src="c6.gif"
  c7=new Image(); c7.src="c7.gif"
  c8=new Image(); c8.src="c8.gif"
  c9=new Image(); c9.src="c9.gif"
  c0=new Image(); c0.src="c0.gif"
  cb=new Image(); cb.src="cb.gif"
  cam=new Image(); cam.src="cam.gif"
  cpm=new Image(); cpm.src="cpm.gif"
  function extract(h,m,s,type)
   {if (!document.images)
    return
    if (h<=9)
      {document.images.a.src=cb.src
       document.images.b.src=eval("c"+h+".src")}
    else
      {document.images.a.src=eval("c"+Math.floor(h/10)+".src")
       document.images.b.src=eval("c"+(h%10)+".src")}
    if (m<=9)
      {document.images.d.src=c0.src
       document.images.e.src=eval("c"+m+".src")}
    else
      {document.images.d.src=eval("c"+Math.floor(m/10)+".src")
       document.images.e.src=eval("c"+(m%10)+".src")}
    if (s<=9)
      {document.g.src=c0.src
       document.images.h.src=eval("c"+s+".src")}
    else
      {document.images.g.src=eval("c"+Math.floor(s/10)+".src")
       document.images.h.src=eval("c"+(s%10)+".src")}
    if (dn=="AM") document.j.src=cam.src
    else document.images.j.src=cpm.src}
  function show3()
    {if (!document.images)
       return
     var Digital=new Date()
     var hours=Digital.getHours()
     var minutes=Digital.getMinutes()
     var seconds=Digital.getSeconds()
     dn="AM" 
     if ((hours>=12)&&(minutes>=1)||(hours>=13))
       {dn="PM"
        hours=hours-12}
     if (hours==0)
     hours=12
     extract(hours,minutes,seconds,dn)
     setTimeout("show3()",1000)}
</Script>


<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0" OnLoad="show3()">
<center>

<!-- BODY START HERE -->

<Img Src="cb.gif" Name="a" border=0><Img Src="cb.gif" Name="b" border=0><Img Src="colon.gif" Name="c" border=0><Img Src="cb.gif" Name="d" border=0><Img Src="cb.gif" Name="e" border=0><Img Src="colon.gif" Name="f" border=0><Img Src="cb.gif" Name="g" border=0><Img Src="cb.gif" Name="h" border=0><Img Src="cam.gif" Name="j" border=0>

<!-- BODY END HERE -->


</center>
</body>
</html>

0

9

Время в строке title!

Код:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>http://bjs.stsland.ru/ - Áàçà ßâà Ñêðèïòîâ (bjs)</title>
</head>

<body bgcolor="#FFFFFF" text="#000000" onload="start(document.forms[0])"
onunload="cleartids()">
<script language="JavaScript">
timestr = "00:00:00";
tid = 0;
pause = 0;
var to;
var bcount;
var tcount;
function writer(){
document.write("test"); 
}
function time(n) {
    tid=window.setTimeout("time(1)",to);
    today = new Date()
    if(today.getMinutes() < 10){ 
        pad = "0"}
    else  
    pad = "";
    if(today.getSeconds() < 10){ 
        pads = "0"}
    else  
    pads = "";
timestr=today.getHours()+":"+pad+today.getMinutes()+":"+pads+today.getSeconds();
                document.title = timestr;
window.clearTimeout(tid);
tid=window.setTimeout("time()",to);
}
function start(x) {
f=x;
                to=60;
time(x);
}
function cleartids() {
	window.clearTimeout(tid);
}
</script>


<p>Ñìîòðèòå íà çàãîëîâîê ñòðàíèöû...</p>
</body>
</html>

0

10

Красивые наручные часы!

Код:
<HTML>
<HEAD>
<title>http://bjs.stsland.ru/ - Áàçà ßâà Ñêðèïòîâ (bjs)</title>

<SCRIPT language=JavaScript>

var clipTop=0
var clipBottom=clipTop+60
var clipLeft
var clipRight
var isNS

if (document.layers) { (isNS=true) }
var HIDDEN = (isNS) ? 'hide' : 'hidden';
var VISIBLE = (isNS) ? 'show' : 'visible';

var imgSeconds
var imgMinutes
var imgHours
var imgClock
var textDate
var textDay
var textLink

var clipHours=""
var clipMinutes=""
var clipSeconds=""

var startLeft=-5
var startTop=85

var tunePosHour =-2

function initObjects() {

 if (document.all) {
  imgSeconds = document.all.imgSeconds.style
  imgMinutes = document.all.imgMinutes.style
  imgHours = document.all.imgHours.style
  imgClock = document.all.imgClock.style
  textDate = document.all.textDate.style
  textDay = document.all.textDay.style
  textLink = document.all.textLink.style
  
  startLeft=-3
  startTop=89
  
  imgHours.posTop=startTop
  imgMinutes.posTop=startTop
  imgSeconds.posTop=startTop
 
  textDate.posTop = 111
  textDate.posLeft = 75
 
  textDay.posTop = 111
  textDay.posLeft = 41
  
  textLink.posTop = 220
  textLink.posLeft = -9
  
  
 
  imgSeconds.visibility=VISIBLE
  imgMinutes.visibility=VISIBLE
  imgHours.visibility=VISIBLE
  imgClock.visibility=VISIBLE
  textDate.visibility=VISIBLE
  textDay.visibility=VISIBLE
  textLink.visibility=VISIBLE
 
  tickIE()
 }
 
 if (document.layers) {
  imgSeconds = document.imgSeconds
  imgMinutes = document.imgMinutes
  imgHours = document.imgHours
  imgClock = document.imgClock
  textDate = document.textDate
  textDay = document.textDay
  textLink = document.textLink
  
  startLeft=-1
  startTop=80
  
  imgHours.top=startTop
  imgMinutes.top=startTop
  imgSeconds.top=startTop
 
  textDate.top = 104
  textDate.left = 75
 
  textDay.top = 104
  textDay.left = 40
  
  textLink.top = 220
  textLink.left = -10
  
  imgSeconds.visibility=VISIBLE
  imgMinutes.visibility=VISIBLE
  imgHours.visibility=VISIBLE
  imgClock.visibility=VISIBLE
  textDate.visibility=VISIBLE
  textDay.visibility=VISIBLE
  textLink.visibility=VISIBLE
 
  tickNS()
 }
 
 
}

function tickIE() {
 var now = new Date()
 var nowHours = now.getHours()
 var nowMinutes = now.getMinutes()
 var nowSeconds = now.getSeconds()

 if (nowHours >= 12) {nowHours=nowHours-12}
 imgHours.posLeft=-(nowHours*60*5+((Math.round(nowMinutes/12))*60)+startLeft+tunePosHour)
 clipLeft = -(imgHours.posLeft)+30
 clipRight= clipLeft+56
 clipHours ="rect("+clipTop+" "+clipRight+" "+clipBottom+" "+clipLeft+")"
 imgHours.clip=clipHours
 
 imgMinutes.posLeft=-((nowMinutes)*60+startLeft)
 clipLeft = -(imgMinutes.posLeft)+30
 clipRight= clipLeft+56
 clipMinutes ="rect("+clipTop+" "+clipRight+" "+clipBottom+" "+clipLeft+")"
 imgMinutes.clip=clipMinutes
 
 
 imgSeconds.posLeft=-((nowSeconds)*60+startLeft)
 clipLeft = -(imgSeconds.posLeft)+35
 clipRight= clipLeft+56
 clipSeconds ="rect("+clipTop+" "+clipRight+" "+clipBottom+" "+clipLeft+")"
 imgSeconds.clip=clipSeconds
 
 var runClock = setTimeout("tickIE()", 100);
}


function tickNS() {
 
 var now = new Date()
 var nowHours = now.getHours()
 var nowMinutes = now.getMinutes()
 var nowSeconds = now.getSeconds()
 
 if (nowHours >= 12) {nowHours=nowHours-12}
 imgHours.left=-(nowHours*60*5+((Math.round(nowMinutes/12))*60)+startLeft+tunePosHour+2)
 clipLeft = -(imgHours.left)+30
 clipRight= clipLeft+56
 imgHours.clip.left = clipLeft
 imgHours.clip.right = clipRight
 imgHours.clip.top = clipTop
 imgHours.clip.bottom = clipBottom
 
 imgMinutes.left=-((nowMinutes)*60+startLeft)
 clipLeft = -(imgMinutes.left)+30
 clipRight= clipLeft+56
 imgMinutes.clip.left = clipLeft
 imgMinutes.clip.right = clipRight
 imgMinutes.clip.top = clipTop
 imgMinutes.clip.bottom = clipBottom
 
 imgSeconds.left=-((nowSeconds)*60+startLeft)
 clipLeft = -(imgSeconds.left)+35
 clipRight= clipLeft+56
 imgSeconds.clip.left = clipLeft
 imgSeconds.clip.right = clipRight
 imgSeconds.clip.top = clipTop
 imgSeconds.clip.bottom = clipBottom

 var runClock = setTimeout("tickNS()", 100);
}


</SCRIPT>

<STYLE>.imgall { POSITION: absolute; VISIBILITY: hidden}</STYLE>

</HEAD>

<BODY bgColor=#ffffff onload=initObjects()>

<DIV class=imgall id=imgClock><IMG src="clock2.jpg"></DIV>

<SCRIPT language=JavaScript>
 var heute = new Date()
 var wochentag = heute.getDay()
 var heuteDatum = heute.getDate()
 
 if (wochentag==0) { wochentag = "âñ." }
 else if (wochentag==1) { wochentag = "ïí." }
 else if (wochentag==2) { wochentag = "âò." }
 else if (wochentag==3) { wochentag = "ñð." }
 else if (wochentag==4) { wochentag = "÷ò." }
 else if (wochentag==5) { wochentag = "ïò." }
 else if (wochentag==6) { wochentag = "ñá." }
 
 document.write('<DIV ID = "textDate" CLASS = "imgall"><font size=1>'+heuteDatum+'</font></DIV>')
 document.write('<DIV ID = "textDay" CLASS = "imgall"><font size=1>'+wochentag+'</font></DIV>')
</SCRIPT>

<DIV class=imgall id=imgHours><IMG src="hours2.gif"></DIV>
<DIV class=imgall id=imgMinutes><IMG src="minutes2.gif"></DIV>
<DIV class=imgall id=imgSeconds><IMG src="seconds2.gif"></DIV>

<DIV ID = "textLink" CLASS = "imgall">
<table cellspacing="2" cellpadding="2" border="0" width=160><tr><td align=center><font size=1><br><br> <br><br><br></td><td></td></tr></tr></table>
</DIV>

</BODY>
</HTML>

0

11

gaswer написал(а):

Krait   Спасибо не прям то что искал но тоже подойдет....

а что ты искал????
ТО anabound ---> не надо помещать подряд несколько постов!!!! :rtfm: правила везде одинаковые!!!! я тоже мог бы поместь штук 10 скриптов!!! :) а в целом не плохо попозднее поюзаю и напишу своё мнение по поводу твоих скриптов :D

0

12

Krait написал(а):

ТО anabound ---> не надо помещать подряд несколько постов!!!!  правила везде одинаковые!!!! я тоже мог бы поместь штук 10 скриптов!!!  а в целом не плохо попозднее поюзаю и напишу своё мнение по поводу твоих скриптов

Просто в одном посте они не помещаются! Вот и пришлось по одному сбрасывать!

0

13

Krait
anabound
Можно просто отключить счетчик сообщений в этом разделе...

0

14

mobiletuner написал(а):

Можно просто отключить счетчик сообщений в этом разделе...

да думаю не стоит :)

0


Вы здесь » Краслава Портал » Скрипты » Часы и таймеры