Javascripts > No Right Click Javascripts > Time Lived v1.0
Script Title: Time Lived v1.0
Description: If you ever wonder how long you have really lived, then this script will give you the answer.
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<script> var nam='' var ask='' var sure='' function calculate(){ var sec=ask*365*24*60*60; var min=ask*365*24*60; var hr=ask*365*24; var day=ask*365; alert(nam+', you have lived '+day+' days, '+hr+' hours, '+min+' minutes and '+sec+' seconds.'); } function tellResult(){ nam=prompt("PLEASE ENTER YOUR NAME!!!"); ask=prompt("PLEASE ENTER YOUR AGE!!!"); if (!ask) must(); else sure=confirm("ARE YOU SURE?"); if (!nam) nam='Well'; if (!sure) tellResult(); else calculate(); } function must(){ alert("You must enter your age!!!");ask=prompt("PLEASE ENTER YOUR AGE!!!"); if (!ask) must(); else sure=confirm("ARE YOU SURE?"); } //--> </script>
Copy the following code between the <BODY></BODY> tags of your html page.<input type='button' value='Time Lived' title='Click Here To Find Out How Long You Have Lived' onClick='tellResult()'>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email