<!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. linux中的livecd、liveDVD和其他安装方式简介

    下载了几种不同格式的centos版本的iso文件,从而对比下各种iso文件的差别,下载的内容如下: 下载之后,分别在虚拟机中进行安装,从而查看有何区别: 1. 使用LiveCD进行安装 在选择安装介质 ...

  2. QT-【转】Qt 4迁移至Qt 5

    将Qt 4代码迁移到Qt 5还是比较简单的.实际上,在Qt 5开发过程中就已经注意了与Qt 4代码保持兼容性. 与Qt 3到Qt 4的迁移不同,Qt 5的核心类库并没有做大的API的修改,只有几个新的 ...

  3. ThinkPHP中U方法与url的四种访问模式

     ThinkPHP中U方法的用处主要是完成对url地址的组装,在模板中使用U方法而不是固定写死URL地址的好处在于,一旦你的环境变化或者参数设置改变,你不需要更改模板中的任何代码.在模板中的调用格式需 ...

  4. 怎么对HTML 5的特性做检测?

    原译文地址:http://www.ido321.com/1116.html 原文:Detect HTML5 Features 译文:HTML5特性检测 译者:dwqs 随 着HTML 5的流行,现在H ...

  5. 在Ubuntu6.06 在搭建SVN服务器及在windows建立svn+ssh客户端 (续)

    接上篇.本篇主要介绍windows下建立svn+ssh客户端. 9.在windows下安装svn客户端,则需安装“TortoiseSVN”.“Puttygen”和“Pageant”    9.1.下载 ...

  6. ACM1998

    /* 魔方阵,古代又称“纵横图”,是指组成元素为自然数1.2…n的平方的n×n的方阵, 其中每个元素值都不相等,且每行.每列以及主.副对角线上各n个元素之和都相等. 输入一个奇数,实现奇数魔方阵. 附 ...

  7. Ruby多字节字符的设计

    Perl.Python的多字节字符处理方式是UCS(Universal Code Set),Ruby的多字节字符处理方式是CSI(Code Set Independent).UCS的做法是,不管你读取 ...

  8. Ubuntu_wifi&pppoe

    学校现在上网全部要拨号,加上我在宿舍用的是无线路由,也就是要在ubuntu下实现连接wifi后再拨号,这个功能在默认的ubuntu网络设置里面是没有的,里面有dsl但是对有线网络使用的,有点小郁闷.不 ...

  9. java类加载与初始化

    第一段: class A{ public A(){ this.list(); } public void list(){ System.out.println("in a list..&qu ...

  10. 并行开发——Parallel的使用 -摘自网络

    随着多核时代的到来,并行开发越来越展示出它的强大威力,像我们这样的码农再也不用过多的关注底层线程的实现和手工控制, 要了解并行开发,需要先了解下两个概念:“硬件线程”和“软件线程”. 1. 硬件线程 ...