»
EnglishFrenchVietnamese

Print - Moving window - JavaScriptBank.com

Full version: jsB@nk » Browser » Window » Moving window
URL: https://www.javascriptbank.com/dynamic-window.html

Moving window © JavaScriptBank.comThis JavaScript creates a movable window.

Full version: jsB@nk » Browser » Window » Moving window
URL: https://www.javascriptbank.com/dynamic-window.html



JavaScript
<script language="JavaScript">var width2=screen.availWidth/2 //How much space is there?window.resizeTo(350,350)window.moveTo(0,0)inter=setInterval("go()", 1);var count=1;var aa=0var bb=0var a=0var b=0function go(u){if (aa==0) a=a+2if (a>screen.availWidth-450)aa=1if (aa==1) a=a-2if (a==0) aa=0if (bb==0) b=b+2if (b>screen.availHeight-350) bb=1if (bb==1) b=b-2if (b==0) bb=0if (count<1000)window.moveTo(a,b)}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->