<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <script type="text/javascript" language="javascript"> function BodyStop() { return false; }; function FindBrowserSize() { var winHeight = document.documentElement.clientHeight; var winWidth = document.documentElement.clientWidth; document.getElementById("min1").style.marginLeft = winWidth / 2 - 150 + "px"; document.getElementById("min1").style.marginTop = winHeight / 2 - 100 + "px"; document.getElementById("min1").style.display = "block"; AutoTime(); } function CloseDiv() { document.getElementById("min1").style.display = "none"; } function MoveToRightBottem() { document.getElementById("min1").style.bottom = "0"; document.getElementById("min1").style.right = "0"; } function AutoTime() { var TimeNum = document.getElementById("TimeOut").innerHTML; if (TimeNum == 1) { document.getElementById("TimeOut").style.display = "none"; MoveToRightBottem(); } else { TimeNum--; document.getElementById("TimeOut").innerHTML = TimeNum; setTimeout("AutoTime()", 1000); } } window.onresize = FindBrowserSize; window.onload = FindBrowserSize; document.body.oncontextmenu = BodyStop; document.body.onselectstart = BodyStop; </script> <div id="min1" style="position: fixed; 300px; height: 200px; background-color: #2b3b58;"> <p style="text-align: right; padding-top: 0px; margin-right: 0px; margin-top: 0px;"> <span id="TimeOut" style="color: red; margin-top: 0px; padding-top: 0px; top: 0px; right: 0px; 30px; height: 20px;">7</span> <span id="CloseDiv" style="color: Red; margin-top: 0px; padding-top: 0px; margin-right: 0px; top: 0px; right: 0px; 30px; height: 20px;"><a href="javascript:CloseDiv();" style="color: Red">关闭</a></span> </p> <div id="mincontent"> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> </div> </div> <div> Hello World !<br /> <input type="button" value="移动" onclick="javascript:MoveToRightBottem();" /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> Hello World !<br /> </div> </form> </body> </html>