Gönderen Konu: Saat Scriptleri  (Okunma sayısı 2316 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Saat Scriptleri
« : Ekim 08, 2006, 18:51:17 ÖS »
<script language="JavaScript">
<!-- Begin

var myweekday="";

var month="";

var year="";

var day="";

mydate = new Date();

myday = mydate.getDay();

mymonth = mydate.getMonth();

myweekday= mydate.getDate();

weekday= myweekday;

myyear= mydate.getYear();

year = myyear

if(myday == 0)

day = " Pazar "

else if(myday == 1)

day = " Pazartesi, "

else if(myday == 2)

day = " Sali "

else if(myday == 3)

day = " Çarşamba "

else if(myday == 4)

day = " Perşembe "

else if(myday == 5)

day = " Cuma, "

else if(myday == 6)

day = " Cumartesi "

if(mymonth == 0) {

month = "Ocak "}

else if(mymonth ==1)

month = "Subat "

else if(mymonth ==2)

month = "Mart "

else if(mymonth ==3)

month = "Nisan "

else if(mymonth ==4)

month = "Mayis "

else if(mymonth ==5)

month = "Haziran "

else if(mymonth ==6)

month = "Temmuz "

else if(mymonth ==7)

month = "Agustos "

else if(mymonth ==8)

month = "Eylül "

else if(mymonth ==9)

month = "Ekim "

else if(mymonth ==10)

month = "Kasim "

else if(mymonth ==11)

month = "Aralik "

if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) 

year="19" + year;

if (navigator.appName == "Netscape")

year=1900 + year;

document.write("<font face=Verdana,Arial, Helvetica size=1 color=#000000>" + myweekday + " "  + month);

document.write(""+ year +","+ day + "</font>"); // End -->

</script>

Ekleyen: bkarayazi
Konuyu Paylaş:
  delicious  facebook  twitter  google
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Ynt: Saat Scriptleri
« Yanıtla #1 : Ekim 08, 2006, 18:51:33 ÖS »
<script LANGUAGE="JavaScript">

<!-- Begin
fCol = 'black';  //face colour.     000000
sCol = 'black';  //seconds colour.  ff0000
mCol = 'black';  //minutes colour.  000000
hCol = 'black';  //hours colour.    000000
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+'</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.style.pixelTop = Ypos - 15 + 40 * Math.sin(-0.49+dots+i/1.9);
ieDigits.style.pixelLeft = Xpos - 14 + 40 * Math.cos(-0.49+dots+i/1.9);
}
for (i=0; i < S.length; i++){
x.style.pixelTop = Ypos + i * Ybase * Math.sin(sec);
x.style.pixelLeft = Xpos + i * Xbase * Math.cos(sec);
}
for (i=0; i < M.length; i++){
y.style.pixelTop = Ypos + i * Ybase * Math.sin(min);
y.style.pixelLeft = Xpos + i * Xbase * Math.cos(min);
}
for (i=0; i < H.length; i++){
z.style.pixelTop = Ypos + i * Ybase*Math.sin(hrs);
z.style.pixelLeft = Xpos + i * Xbase*Math.cos(hrs);
   }
}
setTimeout('clock()', 50);
}
if (document.layers || document.all) window.onload = clock;
//  End -->
</script>

Ekleyen: bkarayazi
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Ynt: Saat Scriptleri
« Yanıtla #2 : Ekim 08, 2006, 18:51:57 ÖS »
<!-- THREE STEPS TO INSTALL DATE-CLOCK COMBINATION:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the onLoad event handler into the BODY tag
  3.  Put the last coding into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<script LANGUAGE="JavaScript">



<!-- Begin
function printDate()
{
  var today = new Date();
  var day=today.getDate();
  var month = today.getMonth() + 1;
  var year = today.getFullYear().toString();
  var box=document.forms[0].DateBox;//this is where we want to print the date
  if ( ( month /10 ) < 1 )
  {
    month=("0" + month).toString(); //add the leading 0 -- looks more professional
  }
  if ( (day/10)<1)
  {
    day=("0" + today.getDate()).toString();//add the leading 0 -- looks better
  }
  box.value=month + " - " + day + " - " + year;
}
function printTime()
{
  var box = document.forms[0].DateBox; //this is where we want to print the date
  var thetime=new Date();
  if (thetime.getMinutes() / 10 <1 )
  {
    box.value=thetime.getHours() + " : " + "0" + thetime.getMinutes();
  }
  else
  {
    box.value=thetime.getHours() + " : " + thetime.getMinutes();
  }
}
//  End -->
</script>

</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

<BODY onLoad="return printDate()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->

<div align="center">
<form name="stats"> Date/Time


<input type="text" readonly="readonly"  name="DateBox" size="10" onmouseover="printTime();" onmouseout="printDate();">


<font size="1">Mouse over to see time</font>
</input>
</form>
</div>


<!-- Script Size:  1.97 KB -->

Ekleyen: bkarayazi
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Ynt: Saat Scriptleri
« Yanıtla #3 : Ekim 08, 2006, 18:52:16 ÖS »
 1.  Put the code into the BODY of your HTML document  -->

<!-- STEP ONE: Copy this code into the BODY of your HTML document  -->
   
<BODY>

<script LANGUAGE="JavaScript1.2">



<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)    // Y2K Fix, Isaac Powell
year = year + 1900; // http://onyx.idbsu.edu/~ipowell
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
// End -->
</SCRIPT>
</CENTER>


<!-- Script Size:  1.00 KB  -->

Ekleyen: bkarayazi
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Ynt: Saat Scriptleri
« Yanıtla #4 : Ekim 08, 2006, 18:52:26 ÖS »
<!-- ONE STEP TO INSTALL CURRENT DATE & TIME (SHORT):

  1.  Put the last code into the BODY of your HTML document  -->

<!-- STEP ONE: Copy this code into the BODY of your HTML document  -->

<BODY>

<script>
document.write(Date()+".")
</SCRIPT>

Ekleyen: bkarayazi
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Ynt: Saat Scriptleri
« Yanıtla #5 : Ekim 08, 2006, 18:52:39 ÖS »
<!-- ONE STEP TO INSTALL BUTTON TIME:

  1.  Put the coding into the BODY of your HTML document  -->

<!-- STEP ONE: Add this code into the BODY of your HTML document  -->

<BODY>

<script LANGUAGE="JavaScript">



<!-- Begin
day = new Date();
miVisit = day.getTime();
function clock() {
dayTwo = new Date();
hrNow = dayTwo.getHours();
mnNow = dayTwo.getMinutes();
scNow = dayTwo.getSeconds();
miNow = dayTwo.getTime();
if (hrNow == 0) {
hour = 12;
ap = " AM";
} else if(hrNow <= 11) {
ap = " AM";
hour = hrNow;
} else if(hrNow == 12) {
ap = " PM";
hour = 12;
} else if (hrNow >= 13) {
hour = (hrNow - 12);
ap = " PM";
}
if (hrNow >= 13) {
hour = hrNow - 12;
}
if (mnNow <= 9) {
min = "0" + mnNow;
}
else (min = mnNow)
if (scNow <= 9) {
secs = "0" + scNow;
} else {
secs = scNow;
}
time = hour + ":" + min + ":" + secs + ap;
document.form.button.value = time;
self.status = time;
setTimeout('clock()', 1000);
}
function timeInfo() {
milliSince = miNow;
milliNow = miNow - miVisit;
secsVisit = Math.round(milliNow / 1000);
minsVisit = Math.round((milliNow / 1000) / 60);
alert("There have been " + milliSince + " milliseconds since midnight, January 1, 1970.  "
+ "You have spent " + milliNow + " of those milliseconds on this page.  "
+ ".... About " + minsVisit + " minutes, and "
+ secsVisit + " seconds.");
}
document.write("<form name=\"form\">"
+ "<input type=button value=\"Click for info!\""
+ " name=button onClick=\"timeInfo()\"></form>");
onError = null;
clock();
// End -->
</SCRIPT>

Ekleyen: bkarayazi
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Ynt: Saat Scriptleri
« Yanıtla #6 : Ekim 08, 2006, 18:52:51 ÖS »
<!-- TWO STEPS TO INSTALL DYNAMIC CLOCK:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<script LANGUAGE="JavaScript">


<!-- Begin
function MakeArrayday(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this = "";
}
return this;
}
function MakeArraymonth(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this = "";
}
return this;
}
function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = ""+ hours + ":" + minutes + ":" + seconds + " " + dn + "";
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("funClock()", 1000)
}
window.onload = funClock;
//  End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

Saat Su anda <span id=clock style="position:relative;"></span>

Ekleyen: bkarayazi
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Ynt: Saat Scriptleri
« Yanıtla #7 : Ekim 08, 2006, 18:53:03 ÖS »
<!-- THREE STEPS TO INSTALL TITLE BAR CLOCK:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the onLoad event handler into the BODY tag
  3.  Put the last coding into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<script LANGUAGE="JavaScript">

<!-- Begin
function clock() {
var date = new Date()
var year = date.getYear()
var month = date.getMonth()
var day = date.getDate()
var hour = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds()
var months = new Array("", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC")

var monthname = months[month]

if (hour > 12) {
hour = hour - 12
}

if (minute < 10) {
minute = "0" + minute
}

if (second < 10) {
second = "0" + second
}


document.title = "JSS - " + monthname + " " + day + ", " + year + " - " + hour + ":" + minute + ":" + second

setTimeout("clock()", 1000)

}
//  End -->
</script>

</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

<BODY onLoad="clock()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->

The script is running in the title bar!!

Ekleyen: bkarayazi
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

 

Benzer Konular

  Konu / Başlatan Yanıt Son İleti
11 Yanıt
4875 Gösterim
Son İleti Aralık 03, 2007, 17:56:41 ÖS
Gönderen: yawru_kurt
1 Yanıt
1591 Gösterim
Son İleti Mart 25, 2007, 02:59:14 ÖÖ
Gönderen: ziyaretci12
2 Yanıt
1070 Gösterim
Son İleti Mayıs 07, 2007, 17:09:27 ÖS
Gönderen: byanderson
4 Yanıt
3516 Gösterim
Son İleti Mayıs 10, 2009, 11:05:08 ÖÖ
Gönderen: ankebut-57
5 Yanıt
1500 Gösterim
Son İleti Eylül 20, 2008, 12:48:05 ÖS
Gönderen: isabey