»
Tiếng AnhTiếng PhápTiếng Việt

In - Sreen Saver bằng trang web - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Linh tinh » Sreen Saver bằng trang web
URL: https://www.javascriptbank.com/opener-screensaver-script.html

Sreen Saver bằng trang web © JavaScriptBank.comHiệu ứng tạo một trình bảo vệ màn hình bằng trang web khi ta không dùng dến chuột và bàn phím trong 5 giây.

Phiên bản đầy đủ: jsB@nk » Linh tinh » Sreen Saver bằng trang web
URL: https://www.javascriptbank.com/opener-screensaver-script.html



JavaScript
<SCRIPT language=JavaScript><!--// ********** Opener Screensaver Script **********// Realised by apacheJeff// any enhancements to this script would be greatfully recievedTimeout=5000 // set delay time for effectTimer=""function oStatic() {clearTimeout(Timer)if(timerRunning == true||blurred==1){ // if win1 opened or opener is blurred, returnreturn}timerRunning = truewin1=window.open("../browser/popup_content.html",'','fullscreen') // if win1 not opened, open win1Timer=setTimeout("oStatic()",Timeout) // run function oStatic after delay}opened=0 // win1 not openedfunction oActive(){ // clearTimeout(Timer)if(opened==1){return} // if win1 opened, returntimerRunning = falseTimer=setTimeout("oStatic()",Timeout) // if win1 not opened run function oStatic after delay}document.onmousemove=oActive // detect mouse movementdocument.onmousedown=oActive // detect if button presseddocument.onkeypress=oActive // detect if key presssetTimeout("oActive()",1000)//--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onblur="blurred='1'" onfocus="blurred='0';oActive()"></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/browser/popup_content.html