الرئيسيةالبوابةس .و .جالتسجيلدخول

شاطر | 
 

 .:::{كودات ساعات غاية في الروعة}:::.

استعرض الموضوع السابق استعرض الموضوع التالي اذهب الى الأسفل 
كاتب الموضوعرسالة
mehdi
عضو مميز
عضو مميز
avatar

ذكر
عدد المشاركات : 1687
العمر : 30
المزاج : مستقر
مكان الإقامة : في حرب الصور
سمعة مشاركاتي : : 8
نقاطي : 33
تاريخ التسجيل : 20/03/2008

مُساهمةموضوع: .:::{كودات ساعات غاية في الروعة}:::.   الثلاثاء مايو 13 2008, 19:10





كود ساعه وتحيه حسب الوقت

الكود:
<script language="JavaScript">
// Instructions:
// This script combines a bunch of different scripts together to
// create the effect of a "floating clock." First off, the browser
// requirements are IE 4.0+. Other browsers will work,
// but the clock will be in the status bar. Don't worry, there's
// a browser detector included, to keep the script completely bug-free.
// I've commented out all of the different sections, to try and make
// it a little easier to understand. Here's a list of the features that
// this "mega-script" includes: Real time clock, message based on the time,
// browser detector, floating display, and AM/PM. There's very little
// that you have to do to set this up; just the font size and color.
// Start Time Function
function makeclock() {
 // Declare the time variables
 var runTime = new Date()
 var hours = runTime.getHours()
 var minutes = runTime.getMinutes()
 var seconds = runTime.getSeconds()
 var dn = "AM"
 var msg = null
 if (hours > 12) {
  dn = "PM"
  hours -= 12
 }
 if (hours == 0) {
  hours = 12
 }
 // After all the definitions for "hours" are done, make the timely messages
 if (hours <= 12 && dn == "AM") {
  msg = "صباح الخير"
 }
 else if (hours <= 5 && dn == "PM") {
  msg = "مساء الخير"
 }
 else {
  msg = "مساء الورد"
 }
 // Continue on with regular time function
 if (minutes <= 9) {
  minutes = "0" + minutes
 }
 if (seconds <= 9) {
  seconds = "0" + seconds;
 }
 currtime = hours + ":" + minutes + ":" + seconds + " " + dn
 // Make sure that the browser is IE 4.0+ or compatible
 if (document.all) {
  currtime += "" + msg
  var html
  document.all.clockface.innerHTML = currtime
 }
 // If the browser's not IE 4.0+, the clock displays in the status bar
 else {
  currtime += " - " + msg
  window.status = currtime
 }
 // Make sure that the clock keeps going
 var keepgoing = setTimeout("makeclock()", 1000)
 // Start the floater function
 check()
}
// End Time Function
// Start floater code
var mover = null
if (navigator.appName.indexOf("Netscape") != -1) {
 var mover = "document.clockface.top = window.pageYOffset"
}
else {
 var mover = "clockface.style.pixelTop = document.body.scrollTop + 10"
}
function check() {
 object = "clockface"
 eval(mover)
 setTimeout("check()", 0)
}
// End floater code
</script>
</head>
<!-- Don't forget the onLoad event handler -->
<body NOOP="makeclock()">
<!-- Begin Style Sheet -->
<!-- (to make the clock look pretty) -->
<style type="text/css"> #clockface {
  background-color : White;
 border: 2px solid black;
  font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size : 10pt;
  font-style : normal;
  padding : 1;
  color : Black;
 position:relative ;
 visibility:show;
 left:10px;
 top:10px;
 z-index:0
 }
 </style>
<!-- End Style Sheet -->
<!-- Begin Clockface HTML -->
<div id="float">
<div id="clockface">
</div>
</div>

كود ساعة ضمن مستطيل - ساعات + دقائق + ثواني

الكود:
[code]<script language="JavaScript">

/* Visit our site at http://java.bdr130.net/ for more code
* This notice must stay intact for use */

<!-- begin script
var ddt1, delay;
function debuteTemps1() {
  var hhmmss = "  ", mymin, sec;
  delay = 1000;

  adate = new Date();
  hhmmss += adate.getHours();
  mymin = adate.getMinutes();
  if (mymin < 10) hhmmss += ":0" + mymin;
  else hhmmss += ":" + mymin;
  sec = adate.getSeconds();
  if (sec < 10) hhmmss += ":0" + sec;
  else hhmmss += ":" + sec;
  hhmmss = " " + hhmmss;
  document.Temps11.heure.value = hhmmss;

  ddt1 = setTimeout("debuteTemps1(delay)",delay);
}
//  end script -->
</script>
<BODY NOOP="debuteTemps1()" NOOP="clearTimeout(ddt1)">
<form name="Temps11">
<input type="text" name="heure" size="8">
</form>[/code]

[b]كود ساعة ضمن مستطيل صغير - ( am - fm )[/b]

<SCRIPT LANGUAGE="JavaScript">

/* Visit our site at http://java.bdr130.net/ for more code
* This notice must stay intact for use */

    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)
        timeValue  += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue  += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue  += (hours >= 12) ? "PM" : "AM"
        document.clock.face.value = timeValue
        timerID = setTimeout("showtime()",1000)
        timerRunning = true
    }
//-->
</SCRIPT>
  <form name="clock" NOOP="0">
    <INPUT TYPE="text" NAME="face" SIZE=11 READONLY VALUE ="....Initializing....">
</form>

<SCRIPT LANGUAGE="JavaScript">
<!--
    startclock()
//-->
</SCRIPT>

كود الساعة مع تاريخ ضمن جدول

الكود:
<CENTER>
<SCRIPT language=JavaScript>
/* Visit our site at http://java.bdr130.net/ for more code
* This notice must stay intact for use
* Translated By www.bdr130.net/
*/

    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)
        timeValue  += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue  += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue  += (hours >= 12) ? "PM" : "AM"
        document.clock.face.value = timeValue
        timerID = setTimeout("showtime()",1000)
        timerRunning = true
    }
//-->
                              </SCRIPT>

                  <FORM name=clock NOOP=0><INPUT readOnly size=11
                  value=....Initializing.... name=face></FORM>
                  <SCRIPT language=JavaScript>
<!-- Begin
monthnames = new Array(
"كانون الثاني",
"شباط",
"آذار",
"نيسان",
"أيار",
"حزيران",
"تموز",
"آب",
"أيلول",
"تشرين الأول",
"تشرين الثاني",
"كانون الأول");
var linkcount=0;
function addlink(month, day, href) {
var entry = new Array(3);
entry[0] = month;
entry[1] = day;
entry[2] = href;
this[linkcount++] = entry;
}
Array.prototype.addlink = addlink;
linkdays = new Array();
monthdays = new Array(12);
monthdays[0]=31;
monthdays[1]=28;
monthdays[2]=31;
monthdays[3]=30;
monthdays[4]=31;
monthdays[5]=30;
monthdays[6]=31;
monthdays[7]=31;
monthdays[8]=30;
monthdays[9]=31;
monthdays[10]=30;
monthdays[11]=31;
todayDate=new Date();
thisday=todayDate.getDay();
thismonth=todayDate.getMonth();
thisdate=todayDate.getDate();
thisyear=todayDate.getYear();
thisyear = thisyear % 100;
thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear));
if (((thisyear % 4 == 0)
&& !(thisyear % 100 == 0))
||(thisyear % 400 == 0)) monthdays[1]++;
startspaces=thisdate;
while (startspaces > 7) startspaces-=7;
startspaces = thisday - startspaces + 1;
if (startspaces < 0) startspaces+=7;
document.write("<table border=2 bgcolor=#FFFFCC ");
document.write("bordercolor=BLACK><font color=000000>");
document.write("<tr><td colspan=7><center><strong>"
+ monthnames[thismonth] + " " + thisyear
+ "</strong></center></font></td></tr>");
document.write("<tr>");
document.write("<td bgcolor=#FFFF66 align=center><font color=BLACK face=tahoma size=2>الاحد</font></td>");
document.write("<td bgcolor=#FFFF66 align=center><font color=BLACK face=tahoma size=2>الاثنين</font></td>");
document.write("<td bgcolor=#FFFF66 align=center><font color=BLACK face=tahoma size=2>الثلاثاء</font></td>");
document.write("<td bgcolor=#FFFF66 align=center><font color=BLACK face=tahoma size=2>الاربعاء</font></td>");
document.write("<td bgcolor=#FFFF66 align=center><font color=BLACK face=tahoma size=2>الخميس</font></td>");
document.write("<td bgcolor=#FFFF66 align=center><font color=BLACK face=tahoma size=2>الجمعة</font></td>");
document.write("<td bgcolor=#FFFF66 align=center><font color=BLACK face=tahoma size=2>السبت</font></td>");
document.write("</tr>");
document.write("<tr>");
for (s=0;s<startspaces;s++) {
document.write("<td> </td>");
}
count=1;
while (count <= monthdays[thismonth]) {
for (b = startspaces;b<7;b++) {
linktrue=false;
document.write("<td>");
for (c=0;c<linkdays.length;c++) {
if (linkdays[c] != null) {
if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
document.write("<a href="" + linkdays[c][2] + "">");
linktrue=true;
      }
  }
}
if (count==thisdate) {
document.write("<font color='FF0000'><strong>");
}
if (count <= monthdays[thismonth]) {
document.write(count);
}
else {
document.write(" ");
}
if (count==thisdate) {
document.write("</strong></font>");
}
if (linktrue)
document.write("</a>");
document.write("</td>");
count++;
}
document.write("</tr>");
document.write("<tr>");
startspaces=0;
}
document.write("</table></p>");
// End -->
                              </SCRIPT>

                  <SCRIPT language=JavaScript>
<!--
    startclock()
//-->                        </SCRIPT>
</CENTER>

كود ساعه رقميه بخلفيه سوداء

الكود:
<style>
<!--
.styling{
background-color:black;
color:lime;
font: bold 15px MS Sans Serif;
padding: 3px;
}
-->
</style>
<div align="center" dir="ltr">
<span id="digitalclock" class="styling"></span>
<script>
/*****************************************
* LCD Clock script- by Javascriptkit
* Translated By www.sakrjava.netfirms.com/
* Visit our site at http://java.bdr130.net/ for more code
* This notice must stay intact for use
***********************************************/
<!--

var alternate=0
var standardbrowser=!document.all&&!document.getElementById

if (standardbrowser)
document.write('<form name="tick"><input type="text" name="tock" size="6"></form>')

function show(){
if (!standardbrowser)
var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var dn="AM"

if (hours==12) dn="PM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0) hours=12
if (hours.toString().length==1)
hours="0"+hours
if (minutes<=9)
minutes="0"+minutes

if (standardbrowser){
if (alternate==0)
document.tick.tock.value=hours+" : "+minutes+" "+dn
else
document.tick.tock.value=hours+"  "+minutes+" "+dn
}
else{
if (alternate==0)
clockobj.innerHTML=hours+"<font color='lime'> : </font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
else
clockobj.innerHTML=hours+"<font color='black'> : </font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
}
alternate=(alternate==0)? 1 : 0
setTimeout("show()",1000)
}
window. NOOP=show

//-->
</script></div>

كود كود ساعه وتاريخ في مربعين نص

الكود:
<html>
<head>
<title>
Date and Time in Forms
</title>
<script language="JavaScript">
<!-- Hide this script from old browsers --
/*
  This script came from the 24 hour JavaScripts Site
located at http://www.javascripts.com.  It is brought to
  you by Eric Jarvies, Lewis Sellers, Giuseppe Lombardo,
          Kurt Anderson, and David Medinets.
*/
function gettheDate() {
        Todays = new Date();
        TheDate = "" + (Todays.getMonth()+ 1) +" / "+ Todays.getDate() + " / " +
        Todays.getYear()
        document.clock.thedate.value = TheDate;
        }

var timerID = null;
var timerRunning = false;
function stopclock (){
        if(timerRunning)
                clearTimeout(timerID);
        timerRunning = false;
}
function startclock () {
        stopclock();
        gettheDate()
        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)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue += (hours >= 12) ? " P.M." : " A.M."
        document.clock.face.value = timeValue;
        // you could replace the above with this
        // and have a clock on the status bar:
        // window.status = timeValue;
        timerID = setTimeout("showtime()",1000);
        timerRunning = true;
}
// -- End Hiding Here -->
</script>
</head>
<body NOOP="startclock()" bgcolor="#FFFFFF">
<form name="clock" NOOP="0">
<input type="text" name="thedate" size=12 value="">
<input type="text" name="face" size=12 value="">
</form>
</body>
</html>




تحياتي
الرجوع الى أعلى الصفحة اذهب الى الأسفل
 
.:::{كودات ساعات غاية في الروعة}:::.
استعرض الموضوع السابق استعرض الموضوع التالي الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
الملتقى al-molta9a :: المنتديات التكنولوجية :: منتدى تطوير المواقع-
انتقل الى: