»
EnglishFrenchVietnamese

Print - Time limit on viewing document script - JavaScriptBank.com

Full version: jsB@nk » Time » Counter » Time limit on viewing document script
URL: https://www.javascriptbank.com/time-limit-on-viewing-document-script.html

Time limit on viewing document script © JavaScriptBank.comA script that sets a time limit on how long a surfer can spend viewing the document. The time left will be constantly shown at the status bar below. After time has expired (ie: 1 minute and 30 seconds), the browser will automatically navigate to another page, forcing the surfer out.

Full version: jsB@nk » Time » Counter » Time limit on viewing document script
URL: https://www.javascriptbank.com/time-limit-on-viewing-document-script.html



JavaScript
<script><!--//enter limit in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59var limit="0:5"if (document.images){var parselimit=limit.split(":")parselimit=parselimit[0]*60+parselimit[1]*1}function begintimer(){if (!document.images)returnif (parselimit==1)window.location="http://JavaScriptBank.com"else{ parselimit-=1curmin=Math.floor(parselimit/60)cursec=parselimit%60if (curmin!=0)curtime=curmin+" minutes and "+cursec+" seconds left"elsecurtime=cursec+" seconds left"window.status=curtimesetTimeout("begintimer()",1000)}}//--></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onLoad="begintimer()"><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->