Создайте новый текстовый файл, скопируйте следующий код и измените имя файла на clock.html и запустите его.
<Script language = javascript> <!- dcol = '0000ff'; // Цвет даты. fcol = '0000ff'; // Цвет лица. scol = '0000ff'; // секунды цвета. mcol = '0000ff'; // минуты цвета. hcol = '0000ff'; // Часы цвета. Clockheight = 40; Часовая труда = 40; Clockfrommousey = 0; Clockfrommousex = 100; // Изменять ничего ниже! Выравнивания будут потеряны! D = New Array («Воскресенье», «Понедельник», «Вторник», «Среда», «Четверг», «Пятница», «Суббота»); m = new Array («Январь», «Февраль», «Март», «Апрель», «Мэй», «Джун», «Июль», «Август», «Сентябрь», «Октябрь», «Ноябрь», «Декабрь»); date = новая дата (); day = date.getDate (); Год = date.getyear (); if (год <2000) год = год+1900; Сегодняшний дат = ""+d [date.getday ()]+""+day+""+m [date.getmonth ()]+""+year; D = сегодняшний.split (''); H = '...'; H = h.split (''); M = '....'; M = m.split (''); S = '.....'; S = s.split (''); Лицо = '1 2 3 4 5 6 7 8 9 10 11 11 12'; font = 'arial'; размер = 1; скорость = 0,5; ns = (document.layers); т.е. = (document.all); Face = face.split (''); n = face.length; a = размер*10; ymouse = 0; xmouse = 0; scrll = 0; props = "<font face ="+font+"size ="+size+"color ="+fcol+"> <b>"; props2 = "<font face ="+font+"size ="+size+"color ="+dcol+"> <b>"; Раскол = 360/n; Dsplit = 360/d.length; HARSHEIGHT = ClockHeight/4.5 Handwidth = ClockWidth/4.5 Handy = -7; HAINX = -2,5; scrll = 0; шаг = 0,06; currstep = 0; y = new Array (); x = new Array (); y = new Array (); x = new Array (); for (i = 0; i <n; i ++) {y [i] = 0; x [i] = 0; y [i] = 0; x [i] = 0} dy = new Array (); dx = new Array (); dy = new Array (); dx = new Array (); for (i = 0; i <d.length; i ++) {dy [i] = 0; dx [i] = 0; dy [i] = 0; dx [i] = 0} if (ns) {for (i = 0; i <d.length; i ++) документ. width = '+a+'> <center> '+props2+d [i]+' </font> </center> </layer> '); for (i = 0; i <n; i ++) document.write ('<name = "nsface'+i+'" top = 0 left = 0 height ='+a+'width ='+a+'> <center>'+props+face [i]+'</font> </centre> </layer>'); for (i = 0; i <s.length; i ++) document.write ('<name = name = nsseconds'+i+'top = 0 left = 0 width = 15 высот = 15> <font face = arial = 3 color ='+scol+'> <center> <b>'+s [i]+'</b> </center> </font> </layer>'); for (i = 0; i <m.length; i ++) document.write ('<name = NSMinutes'+i+'top = 0 left = 0 width = 15 Height = 15> <font face = arial size ='+'+mcol+'> <center> <b> '+m [i]+' </b> </center> </font> </layer> '); for (i = 0; i <H.Length; i ++) Document.Write ('<name = nshours'+i+'top = 0 left = 0 width = 15 Height = 15> <font face = Arial Size = 3 Color ='+hcol+'> <Center> <b>'+h [i]+'</b> </center> </font> </layer>'); } if (ie) {document.write ('<div id = "od" style = "position: absolute; top: 0px; слева: 0px"> <div style = "Положение: относительно">'); for (i = 0; i <d.length; i ++) document.write ('<div id = "iedate" style = "позиция: абсолют; верх; document.write ('</div> </div>'); Document.Write ('<<div id = "of" style = "позиция: Absolute; top: 0px; слева: 0px"> <div style = "Положение: относительно">'); for (i = 0; i <n; i ++) document.write ('<div id = "ieface" style = "позиция: абсолют; верх: 0px; слева: 0; высота:'+a+'; ширина:'+a+'; text-align: center">'+props+face [i]+'</b> </font> </div>'); document.write ('</div> </div>'); document.write ('</div> </div>'); Document.Write ('<<div id = "OH" style = "Положение: Absolute; Top: 0px; слева: 0px"> <div style = "Положение: относительно">'); для (i = 0; i <H.Length; i ++) Document.Write ('<div id = "iehours" style = "позиция: абсолютная; ширина: 16px; высота: 16px; font-family: arial; font-size: 16px; color:'+hcol+'; text-align: center; font-weals: bold">' </hcol+'; document.write ('</div> </div>'); Document.Write ('<<div id = "om" style = "Положение: Absolute; Top: 0px; слева: 0px"> <div style = "Положение: относительно">'); для (i = 0; i <m.length; i ++) document.write ('<div id = "ieminutes" style = "позиция: абсолютная; ширина: 16px; высота: 16px; font-family: arial; font-size: 16px; цвет:'+mcol+'; текстовый align: center; font-weel: bold">'+m [i]+'</</</</</</</</</</</<ply-align: font-weight: bold'> '+m document.write ('</div> </div>') document.write ('<div id = "os" style = "position: absolute; top: 0px; слева: 0px"> <div style = "позиция: относительно">'); для (i = 0; i <s.length; i ++) document.write ('<div id = "ieseconds" style = "позиция: абсолютная; ширина: 16px; высота: 16px; font-family: arial; font-size: 16px; color:'+scol+'; text-align: center; font-weight: bold">'+s [i]+'; document.write ('</div> </div>')} (ns)? window.captureEvents (event.mouseMove): 0; function mouse (evnt) {ymouse = (ns)? evnt.pagey+clockfrommousey- (window.pageyoffset): event.y+clockfrommousey; xmouse = (ns)? evnt.pagex+clockfrommousex: event.x+clockfrommousex; } (ns)? window.onmouseMove = mouse: document.onmouseMove = mouse; function clockandAssign () {time = new Date (); sec = time.getSeconds (); sec = -1,57 + math.pi * sec/30; mins = time.getminutes (); min = -1,57 + math.pi * mins/30; hr = time.gethours (); hrs = -1,575 + math.pi * hr/6 + math.pi * parseint (time.getminutes ())/360; if (ie) {od.style.top = window.document.body.scrolltop; Of.style.top = window.document.body.scrolltop; Oh.style.top = window.document.body.scrolltop; Om.style.top = window.document.body.scrolltop; Os.style.top = window.document.body.scrolltop; } for (i = 0; i <n; i ++) {var f = (ns)? document.layers ['nsface'+i]: ieface [i] .style; F.top = y [i] + clockheight*math.sin (-1.0471 + i*split*math.pi/180) + scrll; F.left = x [i] + clockwidth*math.cos (-1.0471 + i*split*math.pi/180); } for (i = 0; i <h.length; i ++) {var hl = (ns)? Document.layers ['nshours'+i]: iehours [i] .style; Hl.top = y [i]+Handy+(i*handheight)*math.sin (hrs)+scrll; Hl.left = x [i]+handx+(i*handwidth)*math.cos (hrs); } for (i = 0; i <m.length; i ++) {var ml = (ns)? Document.layers ['nsminutes'+i]: ieminutes [i] .style; Ml.top = y [i]+Handy+(i*handheight)*math.sin (min)+scrll; Ml.left = x [i]+handx+(i*handwidth)*math.cos (min); } for (i = 0; i <s.length; i ++) {var sl = (ns)? Document.layers ['nsseconds'+i]: ieseconds [i] .style; Sl.top = y [i]+Handy+(i*handheight)*math.sin (sec)+scrll; Sl.left = x [i]+handx+(i*handwidth)*math.cos (sec); } for (i = 0; i <d.length; i ++) {var dl = (ns)? Document.layers ['nsdate'+i]: iedate [i] .style; Dl.top = dy [i]+clockheight*1,5*math.sin (currstep+i*dsplit*math.pi/180)+scrll; Dl.left = dx [i] + clockwidth*1,5*math.cos (currstep + i*dsplit*math.pi/180); } currstep- = step; } function delay () {scrll = (ns)? window.pageyoffset: 0; Dy [0] = math.round (dy [0]+= ((ymouse) -dy [0])*speed); Dx [0] = math.round (dx [0]+= = ((xmouse) -dx [0])*speed); for (i = 1; i <d.length; i ++) {dy [i] = math.round (dy [i]+= (dy [i-1] -dy [i])*speed); Dx [i] = math.round (dx [i]+= (dx [i-1] -dx [i])*speed); } y [0] = math.round (y [0]+= = ((ymouse) -y [0])*speed); x [0] = math.round (x [0]+= ((xmouse) -x [0])*speed); for (i = 1; i <n; i ++) {y [i] = math.round (y [i]+= (y [i-1] -y [i])*speed); x [i] = math.round (x [i]+= (x [i-1] -x [i])*speed); } ClockandAssign (); setTimeout ('delay ()', 40); } if (ns || ie) window.onload = задержка; // -> </script>