Free Java Scripts
 
  Home
  Contact Us
  Make Your Website as User's Homepage
  Guestbook
  A message box when page opens
  Don't let the user use right click on mouse
  Make your scrollbar colorful
  Search box ( Search engine ) for your page
  Fireworks with different colors
  Stars moving in background
  Magic title for weblogs or any pages on the internet
  Snowing on the page
  Raining on texts
  Close the browser with a button
  Text alert for enter and exit
  Moving text status
  Set background color (User control)
  Nice menu with java script
  Clock
  Go to top of page
  Text following mouse
  Shake internet explorer window
  Change the bgcolor
  Back and forward button
  Print button for page
  Calculator script
  Text dances in status bar
  Visitor and counter
  Clock the visitor time visiting the page
  Asking user's name and say welcome
  Clock in website
  Random background color changer
  Text Effect-1
  Text Effect-2
  Today's Date in website
  Save button
  Two lines following mouse
  Date and time following mouse
  Add website to favorites
Clock the visitor time visiting the page

Clock the visitor time visiting the page


Code:-
<!-- this script got from www.freejavascripts.page.tl -->

<!-- End of Time Spent JavaScript -->
<!-- This scripts tell your sites visitor how long they spent at the page. -->
<!-- Instructions:
    1.  Copy the coding into the HEAD of your HTML document
    2.  Add the last code into the BODY of your HTML document  -->

<HEAD>

<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>


<BODY onLoad="window.setTimeout('getSecs()',1)">

<CENTER>
<FORM>
<FONT SIZE="2" FACE="Arial">Time spent here: </FONT><input size=5 name=timespent>
</FORM>
</CENTER>



<!-- End of Time Spent JavaScript -->


<font face="Tahoma"><a target="_blank" href="http://www.freejavascripts.page.tl/"><span style="font-size: 8pt; text-decoration: none">Free JavaScript</span></a></font>




Preview:-
Time spent here:
Free JavaScript
Time  
   
Partner's Advertisements  
   
Today, there have been 3 visitors (3 hits) on this page!
This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free