js关机效果
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
var t_DiglogX,t_DiglogY,t_DiglogW,t_DiglogH;
function gid(id) {
return document.getElementById?document.getElementById(id):null;
}
function gname(name) {
return document.getElementsByTagName?document.getElementsByTagName(name):new Array()
}
function Browser() {
var ua, s, i;
this.isIE = false;
this.isNS = false;
this.isOP = false;
this.isSF = false;
ua = navigator.userAgent.toLowerCase();
s = "opera";
if ((i = ua.indexOf(s)) >= 0) {
this.isOP = true;return;
}
s = "msie";
if ((i = ua.indexOf(s)) >= 0) {
this.isIE = true;return;
}
s = "netscape6/";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;return;
}
s = "gecko";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;return;
}
s = "safari";
if ((i = ua.indexOf(s)) >= 0) {
this.isSF = true;return;
}
}
function DialogLoc() {
var dde = document.documentElement;
if (window.innerWidth) {
var ww = window.innerWidth;
var wh = window.innerHeight;
var bgX = window.pageXOffset;
var bgY = window.pageYOffset;
} else {
var ww = dde.offsetWidth;
var wh = dde.offsetHeight;
var bgX = dde.scrollLeft;
var bgY = dde.scrollTop;
}
t_DiglogX = (bgX + ((ww - t_DiglogW)/2));
t_DiglogY = (bgY + ((wh - t_DiglogH)/2));
}
function DialogShow(showdata,ow,oh,w,h) {
var objDialog = document.getElementById("DialogMove");
if (!objDialog) objDialog = document.createElement("div");
t_DiglogW = ow;
t_DiglogH = oh;
DialogLoc();
objDialog.id = "DialogMove";
var oS = objDialog.style;
oS.display = "block";
oS.top = t_DiglogY + "px";
oS.left = t_DiglogX + "px";
oS.margin = "0px";
oS.padding = "0px";
oS.width = w + "px";
oS.height = h + "px";
oS.position = "absolute";
oS.zIndex = "5";
oS.background = "#FFFFFF";
oS.border = "solid #000 1px";
objDialog.innerHTML = showdata;
document.body.appendChild(objDialog);
}
function DialogHide() {
ScreenClean();
var objDialog = document.getElementById("DialogMove");
if (objDialog) objDialog.style.display = "none";
}
function ScreenConvert() {
var browser = new Browser();
var objScreen = gid("ScreenOver");
if (!objScreen) var objScreen = document.createElement("div");
var oS = objScreen.style;
objScreen.id = "ScreenOver";
oS.display = "block";
oS.top = oS.left = oS.margin = oS.padding = "0px";
if (document.body.clientHeight) {
var wh = document.body.clientHeight + "px";
} else if (window.innerHeight) {
var wh = window.innerHeight + "px";
} else {
var wh = "100%";
}
oS.width = "100%";
oS.height = wh;
oS.position = "absolute";
oS.zIndex = "3";
if ((!browser.isSF) && (!browser.isOP)) {
oS.background = "#181818";
} else {
oS.background = "#F0F0F0";
}
oS.filter = "alpha(opacity=40)";
oS.opacity = 40/100;
oS.MozOpacity = 40/100;
document.body.appendChild(objScreen);
var allselect = gname("select");
for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "hidden";
}
function ScreenClean() {
var objScreen = document.getElementById("ScreenOver");
if (objScreen) objScreen.style.display = "none";
var allselect = gname("select");
for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "visible";
}
//举报
function Report()
{
//var PostData = "do=" + Type + "&reportid=" + ID;
//PostRequest(window.location.protocol + "//" + window.location.host + "/AJAX_Comm.aspx", PostData);
var showData = sample.innerHTML;
//ScreenConvert();DialogShow("<div id=\"DialogLoading\">正在读取,请稍候</div>",110,10,124,20);
ScreenConvert();DialogShow(showData,400,300,420,350);
}
</script>
</head>
<body>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p><p>1</p>
<p>1</p>
<p>1</p>
<a href="#" onClick="blur();Report();return false;">测试效果</a>
<div style="display:none;" id="sample"><div style="padding-top:10px;"><img src="images/Yservice.jpg" border="0" />
<div style="line-height:24px; margin-top:10px; padding:0px 0px 10px 10px; font-size:12px;">
• 我们提供一流的平台,后续的强有力的拓展服务,将带给你不断的惊喜<br />
• 欲知详情,商业秘密考虑,请联系我们
</div>
<img src="images/Ylianxiwm.jpg" />
<div style="line-height:24px; margin-top:5px; font-size:12px; padding:0px 0px 10px 10px;">上海宽道信息技术有限公司<br />
Address:上海市源深路355号鑫陇大厦412室(200135)<br />
Tel:021-58210073 Fax:021-58210173<br />
E-mail:webmaster@broadwayinfo.com.cn<br />
Msn:broadwayinfo@hotmail.com</div>
<div style="margin:0px 0px 0px 0px; padding:0px 20px 0px 0px; text-align:right;">
<a href="#" title="点击关闭" onClick="return DialogHide();" class="Imga"><img src="images/Yway_11.jpg" border="0" /></a></div></div></div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
var t_DiglogX,t_DiglogY,t_DiglogW,t_DiglogH;
function gid(id) {
return document.getElementById?document.getElementById(id):null;
}
function gname(name) {
return document.getElementsByTagName?document.getElementsByTagName(name):new Array()
}
function Browser() {
var ua, s, i;
this.isIE = false;
this.isNS = false;
this.isOP = false;
this.isSF = false;
ua = navigator.userAgent.toLowerCase();
s = "opera";
if ((i = ua.indexOf(s)) >= 0) {
this.isOP = true;return;
}
s = "msie";
if ((i = ua.indexOf(s)) >= 0) {
this.isIE = true;return;
}
s = "netscape6/";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;return;
}
s = "gecko";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;return;
}
s = "safari";
if ((i = ua.indexOf(s)) >= 0) {
this.isSF = true;return;
}
}
function DialogLoc() {
var dde = document.documentElement;
if (window.innerWidth) {
var ww = window.innerWidth;
var wh = window.innerHeight;
var bgX = window.pageXOffset;
var bgY = window.pageYOffset;
} else {
var ww = dde.offsetWidth;
var wh = dde.offsetHeight;
var bgX = dde.scrollLeft;
var bgY = dde.scrollTop;
}
t_DiglogX = (bgX + ((ww - t_DiglogW)/2));
t_DiglogY = (bgY + ((wh - t_DiglogH)/2));
}
function DialogShow(showdata,ow,oh,w,h) {
var objDialog = document.getElementById("DialogMove");
if (!objDialog) objDialog = document.createElement("div");
t_DiglogW = ow;
t_DiglogH = oh;
DialogLoc();
objDialog.id = "DialogMove";
var oS = objDialog.style;
oS.display = "block";
oS.top = t_DiglogY + "px";
oS.left = t_DiglogX + "px";
oS.margin = "0px";
oS.padding = "0px";
oS.width = w + "px";
oS.height = h + "px";
oS.position = "absolute";
oS.zIndex = "5";
oS.background = "#FFFFFF";
oS.border = "solid #000 1px";
objDialog.innerHTML = showdata;
document.body.appendChild(objDialog);
}
function DialogHide() {
ScreenClean();
var objDialog = document.getElementById("DialogMove");
if (objDialog) objDialog.style.display = "none";
}
function ScreenConvert() {
var browser = new Browser();
var objScreen = gid("ScreenOver");
if (!objScreen) var objScreen = document.createElement("div");
var oS = objScreen.style;
objScreen.id = "ScreenOver";
oS.display = "block";
oS.top = oS.left = oS.margin = oS.padding = "0px";
if (document.body.clientHeight) {
var wh = document.body.clientHeight + "px";
} else if (window.innerHeight) {
var wh = window.innerHeight + "px";
} else {
var wh = "100%";
}
oS.width = "100%";
oS.height = wh;
oS.position = "absolute";
oS.zIndex = "3";
if ((!browser.isSF) && (!browser.isOP)) {
oS.background = "#181818";
} else {
oS.background = "#F0F0F0";
}
oS.filter = "alpha(opacity=40)";
oS.opacity = 40/100;
oS.MozOpacity = 40/100;
document.body.appendChild(objScreen);
var allselect = gname("select");
for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "hidden";
}
function ScreenClean() {
var objScreen = document.getElementById("ScreenOver");
if (objScreen) objScreen.style.display = "none";
var allselect = gname("select");
for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "visible";
}
//举报
function Report()
{
//var PostData = "do=" + Type + "&reportid=" + ID;
//PostRequest(window.location.protocol + "//" + window.location.host + "/AJAX_Comm.aspx", PostData);
var showData = sample.innerHTML;
//ScreenConvert();DialogShow("<div id=\"DialogLoading\">正在读取,请稍候</div>",110,10,124,20);
ScreenConvert();DialogShow(showData,400,300,420,350);
}
</script>
</head>
<body>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p>
<p>1</p><p>1</p>
<p>1</p>
<p>1</p>
<a href="#" onClick="blur();Report();return false;">测试效果</a>
<div style="display:none;" id="sample"><div style="padding-top:10px;"><img src="images/Yservice.jpg" border="0" />
<div style="line-height:24px; margin-top:10px; padding:0px 0px 10px 10px; font-size:12px;">
• 我们提供一流的平台,后续的强有力的拓展服务,将带给你不断的惊喜<br />
• 欲知详情,商业秘密考虑,请联系我们
</div>
<img src="images/Ylianxiwm.jpg" />
<div style="line-height:24px; margin-top:5px; font-size:12px; padding:0px 0px 10px 10px;">上海宽道信息技术有限公司<br />
Address:上海市源深路355号鑫陇大厦412室(200135)<br />
Tel:021-58210073 Fax:021-58210173<br />
E-mail:webmaster@broadwayinfo.com.cn<br />
Msn:broadwayinfo@hotmail.com</div>
<div style="margin:0px 0px 0px 0px; padding:0px 20px 0px 0px; text-align:right;">
<a href="#" title="点击关闭" onClick="return DialogHide();" class="Imga"><img src="images/Yway_11.jpg" border="0" /></a></div></div></div>
</body>
</html>