منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
عمل ساعه في ال Status Bar - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : الأقسام التعليمية - المنتدى القديم (http://vb4arb.com/vb/forumdisplay.php?fid=90)
+--- قسم : مكتبة أكواد المنتدى (http://vb4arb.com/vb/forumdisplay.php?fid=111)
+---- قسم : مكتبة أكواد ال Scripts (http://vb4arb.com/vb/forumdisplay.php?fid=118)
+---- الموضوع : عمل ساعه في ال Status Bar (/showthread.php?tid=5967)



عمل ساعه في ال Status Bar - RaggiTech - 17-10-12

كاتب الموضوع : AhmedEssawy


كود :
<script Language="JavaScript">
<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
// Navigation - Stop
// Netscapes Clock - Start
// this code was taken from Netscapes JavaScript documentation at
// www.netscape.com on Jan.25.96

var timerID = null;
var timerRunning = false;

function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

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."
window.status = timeValue;
// you could replace the above with this
// and have a clock on the status bar:
//
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}

function startclock () {
// Make sure the clock is stopped
stopclock();
showtime();
}

// -->
</script>

اضف هذا لكود في ال BODY

كود :
[FONT=Arial, Helvetica][SIZE=2]<BODY [b]onLoad="startclock()"[/b]>[/SIZE][/FONT]
==

كود :
[FONT=Arial, Helvetica][SIZE=2]<form name="clock" onSubmit="0">[/SIZE][/FONT]