وقت بقائك في الصفحه
هذا الكود يحسب وقت بقائك في الصفحه
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Microsoft FrontPage 2.0"> <title>Time spent hh:mm</title> </head> <body bgcolor="#FFFFFF" onload="window.setTimeout('getSecs()',1)"> <script language="JavaScript"> <!-- begin startday = new Date(); clockStart = startday.getTime(); function initStopwatch() { var myTime = new Date(); return((myTime.getTime() - clockStart)/1000); } function getSecs() { var tSecs = Math.round(initStopwatch()); var iSecs = tSecs % 60; var iMins = Math.round((tSecs-30)/60); var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs); var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins); document.forms[0].timespent.value = sMins+":"+sSecs; window.setTimeout('getSecs()',1000); } // end --> </script> <p> </p> <p><font size="4"><strong>يقوم الان بحساب وقت مكوثك فى هذة الصفحة</strong></font></p> <p> </p> <hr> <form> <p align="center"><input type="text" size="7" name="timespent"> </p> </form> <p> </p> <p> </p> <p align="right">اتمنى لكم وقتأ ممتعأ<a href="rzeitel@mars.superlink.net"> </a><a href="http://mars.superlink.net/rzeitel"></a></p> </body> </html>
مثال
يقوم الان بحساب وقت مكوثك فى هذة الصفحة اتمنى لكم وقتأ ممتعأ
يقوم الان بحساب وقت مكوثك فى هذة الصفحة
اتمنى لكم وقتأ ممتعأ