JavaScript Scripts





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Free Java Script Codes
Javascript List All
Slide Show Slide Show
Ad Display Ad Display
Image Effect Image Effect
Animated Image Effects Animated Image Effects
Form Validation Form Validation
Color Picker Tool Color Picker Tool
Formatting Forms Formatting Forms
Select All Select All
Dynamic Form Select Dynamic Form select
Dynamic Color Dynamic Color
Calendar Script Calendar
Textbox Counter Textbox Counter
Alphanumeric Alphanumeric
Date Time Script Date & Time
Stop Watch Script Stop Watch script
Delete Repeated Values Delete Repeated Values
Pagination Pagination
Random Generator Random Generator
Animated Text Animated Text
Cursor Position Cursor Position
User Info Window / User Info
Security Security / Authenticate
Bookmark Bookmark
Mouse Effects Mouse Effects
Title Bar Title Bar
Status Bar Status Bar
Country List Country List
Free Games Free Games
Calculators Calculators
 




Time Spent on Web page in Seconds


About
  Time on site is one of the most useful metrics. This javascript is used to display how much time you spent for the specific web page. Time will be automatically updated lively in seconds.


Features
a) Used to display the spending time of a specific webpage.
b) Time will be updated lively in seconds.
c) Simple and easy to use.

Preview



Code
Javascript Code
<!-- Script by hscripts.com -->
<!-- Copyright of HIOXINDIA -->
<!-- More scripts @www.hscripts.com -->

<script type="text/javascript">
pageOpen = new Date();
 function ctck()
{
    var sds = document.getElementById("dum");
    if(sds == null){
        alert("You are using a free package.\n You are not allowed to remove the tag.\n");
    }
    var sdss = document.getElementById("dumdiv");
    if(sdss == null){
        alert("You are using a free package.\n You are not allowed to remove the tag.\n");
    }
}
document.onload="ctck()";

function leavingPage()
{

pageClose =new Date();
hours=pageClose.getHours()-pageOpen.getHours();
minutes=pageClose.getMinutes()-pageOpen.getMinutes();
seconds=pageClose.getSeconds()-pageOpen.getSeconds();
time = (seconds + (minutes * 60) + (hours * 60 * 60));
if(time<60){
document.time.tfield.value="Time Spent By You In This Site " + time + " seconds";
}
else
{
min=(parseInt(time/60));
sec=(time%60);
document.time.tfield.value="Time Spent By You In This Site " + min + " minutes " + sec + " seconds";
}
}
function timer()
{
leavingPage();
setTimeout('timer()',1000)
}
document.onload=timer();
</script>

<div style="font-size: 10px;color: #dadada;" id="dumdiv">
<a href="http://www.hscripts.com" id="dum" style="text-decoration:none;color: #dadada;">©h</a></div>

<!-- Script by hscripts.com -->

Release Date - 11-02-2010
Get free version without ©copyright link for just 5 price

For customization of this script or any script development, contact us at support@hscripts.com


Usage
 a) Copy and paste the javascript code into your HTML page and make use of this.
 b) Use the below html code into your page.
   <form name=time>
   <input type=text name=tfield size=44>
   </form>
 c) This script is used to display how much time you spent for a specific web page in seconds.


License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.
Other Links

web hosting