<!---the bay window begins- - <DivID= "IMG1"style= "z-index:999; border:1px solid RGB (204, 204, 204); width:340px; background-color:white; height:100px; position: Absolute top:29px; left:1230px; font-size:13px; " > <Divstyle= "HEIGHT:18PX;MARGIN-LEFT:310PX;MARGIN-TOP:6PX;"> <ahref= "javascript:void (0);"onclick= "Closediv ()"title= "Click to close"style= "Height:16px;text-decoration:none;color: #666;">Shut down</a> </Div> <Div> <ahref=""Target= "_blank"><imgsrc= "Images/float_20171001.png"alt= "Mid-Autumn Festival, double Festival with celebration"title= "Mid-Autumn Festival, double Festival with celebration"></a> </Div> </Div> <Scripttype= "Text/javascript"> varobj=document.getElementById ("IMG1"); varGgroll={roll:obj, speed: -, StatusX:document.documentElement.clientWidth-Document.body.clientWidth, StatusY:document.documentElement.clientHeight-document.body.clientHeight, x: $, y: -, WinW:document.body.clientWidth-Obj.offsetwidth* 2, WinH:document.body.clientHeight-obj.offsetheight, Go:function () { This. Roll.style.left= This. x+ 'px'; This. Roll.style.top= This. Y+ 'px'; This. x= This. x+ ( This. Statusx? -1 : 1); if ( This. x< 0) { This. Statusx= 0; } if ( This. x> This. winw) { This. Statusx= 1; } This. Y= This. Y+ ( This. Statusy? -1 : 1); if ( This. Y< 0) { This. Statusy= 0; } if ( This. Y> This. Winh) { This. Statusy= 1; } } } varIntervaly=SetInterval ("Ggroll.go ()", Ggroll.speed); GgRoll.roll.onmouseover= function() {clearinterval (intervaly); }; GgRoll.roll.onmouseout= function() {intervaly=SetInterval ("Ggroll.go ()", Ggroll.speed); }; functionClosediv () {clearinterval (intervaly); Obj.style.display= "None"; Obj.parentNode.removeChild (obj); } </Script> <!---The end of the bay window- -
Page foreground page picture Floating window code