Last Login Date/Time Display Script is used to show the users with the last logon date and time to the website/webpage.
Features
a) Track the login date and time of individual users.
b) The display script records the visitor's last login date/time and displays it upon their return.
c) This javascript code supports all type of browsers.
<!-- Script by hscripts.com -->
<script type="text/javascript">
function onload()
{
exd = new Date();
var hours=exd.getHours();
var min=exd.getMinutes();
var sec=exd.getSeconds();
var dat=exd.getDate();
var month=exd.getMonth();
var year=exd.getFullYear();
var dn="AM";
if(hours==12){
dn="PM";
}
if(hours>12){
dn="PM";
hours=hours-12;
}
if(hours<10)
{
hours="0"+hours;
}
if(min<10)
{
min="0"+min;
}
if(sec<10)
{
sec="0"+sec;
}
if(dat<10)
{
dat="0"+dat;
}
if(month<10)
{
month="0"+month;
}
var clock=hours+":"+min+":"+sec+""+dn;
var datee=dat+"-"+ month+"-"+year;
var id=document.getElementById("datme");
id.innerHTML="<center><h1><font color=green>Welcome to HScripts.com</font></h1><h4><font color=red>Your Login Time is:"+clock+"</h4><h4>Your Login date is:"+datee+ "</font></h4></center>";
}
</script>
<!-- Script by hscripts.com -->
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 file.
b) Upon execution the javascript displays the last login date and time of the visitor on your webpage upon their return.
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.