• Page 1 of 1
  • 1
UcozBaze All Scripts And Templates » Scripts and Coding » Clock for ucoz » Grazus laikrodis ucoz (Grazus laikrodis ucoz)
Grazus laikrodis ucoz
interoutDate: Wednesday, 2011-09-14, 0:29 AM | Message # 1
Group: Administrators
Messages: 1027
34


Skripta dedame betkur i mums reikalinga saito vieta:

Code
<script language="JavaScript">    
<!--    
var digit = new Array()    
digit[0] = new Image(35, 60)    
digit[1] = new Image(35, 60)    
digit[2] = new Image(35, 60)    
digit[3] = new Image(35, 60)    
digit[4] = new Image(35, 60)    
digit[5] = new Image(35, 60)    
digit[6] = new Image(35, 60)    
digit[7] = new Image(35, 60)    
digit[8] = new Image(35, 60)    
digit[9] = new Image(35, 60)    
digit[10] = new Image(35, 60) // am    
digit[11] = new Image(35, 60) // pm    
digit[12] = new Image(35, 60) // colon    
digit[13] = new Image(35, 60) // blank    

// assign sources to digit image objects (0 - 9)    
for (var i = 0; i < 10; ++i) {    
    digit[i].src = "http://megabig.at.ua/images/" + "dg" + i + ".png"    
}    

// assign sources to other image objects    
digit[10].src = "http://megabig.at.ua/images/" + "dgam.png"    
digit[11].src = "http://megabig.at.ua/images/" + "dgpm.png"    
digit[12].src = "http://megabig.at.ua/images/" + "dgc.png"    
digit[13].src = "http://megabig.at.ua/images/" + "dgb.png"    

// 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=\"http://megabig.at.ua/images/" + "dg"    
var closeImage = ".png\" HEIGHT=60 WIDTH=35>"    
document.write(openImage + hour1 + closeImage)    
document.write(openImage + hour2 + closeImage)    
document.write(openImage + "c.gif\" HEIGHT=60 WIDTH=18>")    
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 >= 24)    
    hour -= 24    
    hour = (hour == 0) ? 24 : 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 >= 24)    
    return 11 // pm    
    /* else */    
    return 10 // am    
}    

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

// -->    
</script>


 
Message


Skripta dedame betkur i mums reikalinga saito vieta:

Code
<script language="JavaScript">    
<!--    
var digit = new Array()    
digit[0] = new Image(35, 60)    
digit[1] = new Image(35, 60)    
digit[2] = new Image(35, 60)    
digit[3] = new Image(35, 60)    
digit[4] = new Image(35, 60)    
digit[5] = new Image(35, 60)    
digit[6] = new Image(35, 60)    
digit[7] = new Image(35, 60)    
digit[8] = new Image(35, 60)    
digit[9] = new Image(35, 60)    
digit[10] = new Image(35, 60) // am    
digit[11] = new Image(35, 60) // pm    
digit[12] = new Image(35, 60) // colon    
digit[13] = new Image(35, 60) // blank    

// assign sources to digit image objects (0 - 9)    
for (var i = 0; i < 10; ++i) {    
    digit[i].src = "http://megabig.at.ua/images/" + "dg" + i + ".png"    
}    

// assign sources to other image objects    
digit[10].src = "http://megabig.at.ua/images/" + "dgam.png"    
digit[11].src = "http://megabig.at.ua/images/" + "dgpm.png"    
digit[12].src = "http://megabig.at.ua/images/" + "dgc.png"    
digit[13].src = "http://megabig.at.ua/images/" + "dgb.png"    

// 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=\"http://megabig.at.ua/images/" + "dg"    
var closeImage = ".png\" HEIGHT=60 WIDTH=35>"    
document.write(openImage + hour1 + closeImage)    
document.write(openImage + hour2 + closeImage)    
document.write(openImage + "c.gif\" HEIGHT=60 WIDTH=18>")    
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 >= 24)    
    hour -= 24    
    hour = (hour == 0) ? 24 : 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 >= 24)    
    return 11 // pm    
    /* else */    
    return 10 // am    
}    

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

// -->    
</script>

Author - interout
Date Added - 2011-09-14 в 0:29 AM
BAtmanDate: Monday, 2011-09-19, 11:20 AM | Message # 2
Group: Member
Messages: 129
3
Jis veikia ? biggrin

 
MessageJis veikia ? biggrin

Author - BAtman
Date Added - 2011-09-19 в 11:20 AM
interoutDate: Monday, 2011-09-19, 6:10 PM | Message # 3
Group: Administrators
Messages: 1027
34
BAtman, Taip

 
MessageBAtman, Taip

Author - interout
Date Added - 2011-09-19 в 6:10 PM
mmarkysDate: Saturday, 2012-06-30, 5:49 PM | Message # 4
Group: UcozBaze Team
Messages: 11
0
kazkas negerai su juo, jei galit dar kart patikrinkit. Pas mane antras valandu skaitmuo nerodo.

Pasirodo blogai rodo tik tada kai esi prisijunges i tinklalapi. Sveciams rodo normaliai. Kam tas AM uzrasas juk laikrodis rodo valandas 24h ne 12h am/pm. Ar imanoma pakeist spalvas? Jei galit padarykit, kad rodytu normaliai visus skaitmenis ir 12h AM/PM, buciau dekingas. Stai mano puslapis - http://egc.ucoz.com

Pasikeiciau formata, spalva, bet vis dar kazko blogai rodo.
Visiem apart man gerai rodo tiek to tada.. biggrin


Message edited by mmarkys - Saturday, 2012-06-30, 6:07 PM
 
Messagekazkas negerai su juo, jei galit dar kart patikrinkit. Pas mane antras valandu skaitmuo nerodo.

Pasirodo blogai rodo tik tada kai esi prisijunges i tinklalapi. Sveciams rodo normaliai. Kam tas AM uzrasas juk laikrodis rodo valandas 24h ne 12h am/pm. Ar imanoma pakeist spalvas? Jei galit padarykit, kad rodytu normaliai visus skaitmenis ir 12h AM/PM, buciau dekingas. Stai mano puslapis - http://egc.ucoz.com

Pasikeiciau formata, spalva, bet vis dar kazko blogai rodo.
Visiem apart man gerai rodo tiek to tada.. biggrin

Author - mmarkys
Date Added - 2012-06-30 в 5:49 PM
UcozBaze All Scripts And Templates » Scripts and Coding » Clock for ucoz » Grazus laikrodis ucoz (Grazus laikrodis ucoz)
  • Page 1 of 1
  • 1
Search:
                                                               
Statistics Forum
New Posts Popular topic Top Forum Users New User

type list Appearance of entries movie site for uCoz (0)
type list Google preloader on pure CSS ucoz (0)
type list Pre-Loader for a site on pure CSS (Transition) ucoz (0)
type list Script to disable the F12 key and right-click ucoz (0)
type list Animated button for downloading using SVG and Vue UCOZ (0)
type list Top Forum Users ucoz (0)
type list Snow script for your website ucoz (0)
type list Original watch without digits ucoz (0)
type list Bookmark Buttons Generator (0)
type list Automatically add tags for all uCoz modules (6)
type list How to customize the design of the site for mobile version (3)
type list Video player for uCoz (3)
type list Auto Youtube Trailers for Ucoz Movies Web (0)
type list Pranešimai skrti jums yra matomi Tag Board Ucoz skriptas (1)
type list Why can’t I copy large files over 4GB to my USB flash drive (0)
type list Forumo Informatorius (2)
type list Pereiti i kita puslapi forume 1.2.3. Ucoz skriptas (1)

type list Skaiciuojam nuo 1 iki 1000 ! (557)
type list Forum SignatureBar (60)
type list Avatars (22)
type list Juokingos Fotkes :) (19)
type list Kaip pakeisti paveiksla mazas? (19)
type list Mini-Chatas islendantis is sono ucoz (15)
type list Mp3-Tau.do.am (13)
type list Шаблон форума для ucoz For-css (12)
type list Ucoz script - favicon (11)
type list Megsti samp? Ateik cia (10)
type list Button scrolling up ucoz (10)
type list Slider KinoPlius Help to setup :) (10)
type list Apklausa Jūsų Svetainei New ucoz (10)
type list KinoPlius (9)
type list SexMergytes.do.am (9)
type list Money for the forum ucoz (9)
type list 11.17.2011 (9)
type list Puslapis "Atliekami techniniai darbai" Ucoz scriptas (9)
type list User personal Page ucoz (8)
interout
Forum Posts: 1027
Comments: 51
Reputation: 83
Rank:
GoblinaS
Forum Posts: 380
Comments: 15
Reputation: 25
Rank:
Adi
Forum Posts: 179
Comments: 11
Reputation: 23
Rank:
Esquire
Forum Posts: 147
Comments: 8
Reputation: 5
Rank:
BAtman
Forum Posts: 129
Comments: 1
Reputation: 18
Rank:
WaSHkaZ
Forum Posts: 83
Comments: 0
Reputation: 3
Rank:
Skacikas
Forum Posts: 71
Comments: 0
Reputation: 12
Rank:
meskis
Forum Posts: 51
Comments: 0
Reputation: 25
Rank:
Gytenas
Forum Posts: 51
Comments: 0
Reputation: 1
Rank:
vicka
Forum Posts: 50
Comments: 1
Reputation: 4
Rank:
Samartinean
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Азиза_Азизи
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
woscs1-6
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Matruka
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
ArEzO
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
masterkmv74
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
bloody-warrior1
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
constantinm188
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
doctor_server
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
paynergroup
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:


Site design by uCozBaze
uCozBaze © 2011-2016