<!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" xml:lang="en" lang="en">

       <head>

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

              <title>test1</title>

              <script>

              function show(){

                     var div=top.document.createElement("div");

                     var divText=document.createTextNode("Saving");

                     div.appendChild(divText);

                     div.style.width=top.document.documentElement.scrollWidth+"px";

                     div.style.height=top.document.documentElement.scrollHeight+"px";

                     div.style.backgroundColor="gray";

                     div.style.position="absolute";

                     div.style.left=0;

                     div.style.top=0;

                     div.style.zIndex=9999;

                     if(top.document.all)

                        div.style.filter = "alpha(opacity=30)";

                  else div.style.opacity = .3;

                     top.document.getElementById("ddd").appendChild(div);

                     alert("真棒");

              }

              </script>

       </head>

       <body>

       <div id="ddd">

       <input type="button" value="click" onclick="show()" />

       </div>    

       </body>

</html>

Version 2

@{
ViewBag.Title = "Index"; } @section Scripts{ <script type="text/javascript">
$(document).ready(function () { $("#btnShow").click(function () {
// alert("show"); var div=document.createElement("div"); //div.style.width=top.document.documentElement.scrollWidth+"px"; //div.style.height=top.document.documentElement.scrollHeight+"px"; div.style.width="100px"; div.style.height="100px"; div.style.backgroundColor="gray"; div.style.position="absolute"; div.style.left = top.document.documentElement.scrollWidth/2 + "px"; div.style.top = document.getElementById("ddd").offsetHeight / 2 + "px"; div.style.zIndex=80; document.getElementById("ddd").appendChild(div); //*********************************************************************
var Topdiv = document.createElement("div"); Topdiv.style.width = "700px"; Topdiv.style.height = "700px"; Topdiv.style.backgroundColor = "red"; Topdiv.style.position = "absolute"; Topdiv.style.left = 0; //Topdiv.style.top = document.getElementById("ddd").offsetHeight /2 + "px";
Topdiv.style.top = 0;
Topdiv.style.zIndex = 70; if (top.document.all) Topdiv.style.filter = "alpha(opacity=30)"; else Topdiv.style.opacity = .3; document.getElementById("ddd").appendChild(Topdiv); alert("真棒"); }); }); </script> } <h2>Index</h2> <div id="ddd" style="z-index: 100;"> <input type="button" id="btnShow" value="click" />
<h1>hello1111</h1>
<h1>hello1111</h1>
<h1>hello1111</h1>
<h1>hello1111</h1>
<h1>hello1111</h1>
<h1>hello1111</h1>
</div>

JS_CSS_logon_Mask的更多相关文章

随机推荐

  1. asmcmd报错

    在进入asm的命令行时报错: 报错内容如下 [oracle@kel dbs]$ asmcmd asmcmd: command disallowed by current instance type 从 ...

  2. IE 8兼容:X-UA-Compatible的解释

    来源:http://www.ido321.com/940.html 来自StackOverFlow 问题描述: 1: <meta http-equiv="X-UA-Compatible ...

  3. Nonlinear Transform

    前文中,我们已经学习了linear classification,linear regression,logistic regression三种线性方法. 如何解决这种问题呢? 其实很好解决,只需要加 ...

  4. 安装CPqD/ofdissector遭遇的错误

    为了安装支持openflow1.3的wireshark插件,在下载了ofdissector.git,并进入了其src目录后,执行scons install,出现如下错误: util/FieldMana ...

  5. <Stackoverflow> 如何提问

    如何提问 欢迎来到Stack Overflow! 我们很乐意帮助你,但是实际情况是并非每一个问题都能得到解决.为了提高你的机会,这儿有一些帮助: 1 检索及调查 在提出你的问题之前,你已经通过检索来寻 ...

  6. Java 简繁转换 ZHConverter

    Sample import com.spreada.utils.chinese.ZHConverter; public class Test{ public static void main(Stri ...

  7. leetcode@ [352] Data Stream as Disjoint Intervals (Binary Search & TreeSet)

    https://leetcode.com/problems/data-stream-as-disjoint-intervals/ Given a data stream input of non-ne ...

  8. cocos2d-x生成随机数

            //获取系统时间         //time_t是long类型,精确到秒,通过time()函数可以获得当前时间和1970年1月1日零点时间的差         time_t tt; ...

  9. 现代程序设计homework——04

    题目: 详见:http://www.cnblogs.com/xinz/p/3341551.html 题目本身确实很难,“很难想到一个比较优雅的算法”,这是一个老师请来专门讲解这道题的大牛的原话.确实, ...

  10. CodeForces 682A Alyona and Numbers (水题)

    Alyona and Numbers 题目链接: http://acm.hust.edu.cn/vjudge/contest/121333#problem/A Description After fi ...