Parašė Ganxteriz· 2007 Bir. 19 21:06:30
#8
Radau stai toki java scripta.
<SCRIPT LANGUAGE="JavaScript">
<!--
function MakeArray(n) {
this.length = n
return this
}
monthNames = new MakeArray(12)
monthNames[1] = "Sausis"
monthNames[2] = "Vasaris"
monthNames[3] = "Kovas"
monthNames[4] = "Balandis"
monthNames[5] = "Gegužė"
monthNames[6] = "Birželis"
monthNames[7] = "Liepa"
monthNames[8] = "Rugpjūtis"
monthNames[9] = "Rugsėjis"
monthNames[10] = "Spalis"
monthNames[11] = "Lapkritis"
monthNames[12] = "Gruodis"
dayNames = new MakeArray(7)
dayNames[1] = "Sekmadienis"
dayNames[2] = "Pirmadienis"
dayNames[3] = "Antradienis"
dayNames[4] = "Trečiadienis"
dayNames[5] = "Ketvirtadienis"
dayNames[6] = "Penktadienis"
dayNames[7] = "Šeštadienis"
function customDateString() {
currentDate = new Date()
var theDay = dayNames[currentDate.getDay() + 1]
var theMonth = monthNames[currentDate.getMonth() + 1]
msie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
if (msie4) {
var theYear = currentDate.getYear()
}
else {
var theYear = currentDate.getYear() +1900
}
return theDay + ", " + theMonth + " " + currentDate.getDate() + ", " + theYear
}
//-->
</SCRIPT>
Man sake sita scripta reikia rasyti tarp <head></head> , bet nzn kokioje vietoje ir kokiame faile, gal galit parasyti kur?
<SCRIPT LANGUAGE="JavaScript">
document.write(customDateString())
</SCRIPT>
O sita scripta irasyti i ta vieta kur bus rodomas laikrodis.
Bandziau pirma scripta rasyti theme.php faile po ?> sito, o antra vietoj seno laikrodzio, bet man rode tuscia, nei seno nei naujo laikrodzio
Cia biski ne apie kiek narso, bet vsitiek ir sito man reikia ;]]
Redagavo Ganxteriz· 2007 Bir. 19 21:06:11