这个方法不是我想要的,我要的效果是跟新浪的评论回复一样http://translate.google.com/translate?sourceid=navclient&hl=zh-CN&u=http%3a%2f%2fwww%2efootballsquads%2eco%2euk%2f

解决方案 »

  1.   

    http://groups.csdn.net/javascript/editsectioncard  点击那个卡片
      

  2.   

    看梅老大的思路,貌似是在body里插入一个width,height都是100%的层,把所有玩意儿都盖掉的样子让我感兴趣的是
    MzLockWindow._hide("SELECT"); MzLockWindow._hide("OBJECT");}
    我们都知道div是盖不住select这样地咚咚,so,梅老大就把他们都hide了,为了避免show的时候,把原来hide的误show出来,还加了个属性保存,呵呵那iframe里的select盖得住吗?没试过,问问
      

  3.   

    从梅老大的代码盗版而来,IE6.0,FF1.5下pass,对付着用吧<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>无标题文档</title>
    <script language="JavaScript">
    <!--
    var lwindow;
    function LockWindow(){
      var div = document.createElement("DIV");
      div.id  = "MzLockWindow_"+"_"+new Date().getTime();
      
      with(div.style)
      {
        zIndex = 10000;
        top = "0px";
        left = "0px";
        width = "100%";
        height = "100%";
        border = "none";
    //    display = "none";
        margin = padding = 0;
        position = "absolute";
        backgroundColor = "#999999";
        backgroundImage = "url(/transparent.gif)";
    duration=1000;
      }
      document.body.insertBefore(div, document.body.firstChild);
      _hide("SELECT");
      _hide("OBJECT"); 
      _hide("IFRAME"); 
      _Resize(div);
      document.getElementById("Layer1").style.visibility="visible";
      return div;
    }function _Resize(obj)
    {
      obj.style.width = "100%";
      obj.style.height= "100%";  var bodyCW, bodyCH; if(window.innerWidth) bodyCW=window.innerWidth;
      else if(document.documentElement&&document.documentElement.clientWidth)
        bodyCW=document.documentElement.clientWidth;
      else if(document.body) bodyCW=document.body.clientWidth;  if(window.innerHeight) bodyCH=window.innerHeight;
      else if(document.documentElement&&document.documentElement.clientHeight)
        bodyCH=document.documentElement.clientHeight; 
      else if(document.body) bodyCH=document.body.clientHeight;  setTimeout(function() //for ie;
      {
        bodyCW = Math.max(document.body.scrollWidth,  bodyCW);
        bodyCH = Math.max(document.body.scrollHeight, bodyCH);
        obj.style.width = bodyCW +"px";
        obj.style.height= bodyCH +"px";
      }, 1);
    }
    function _show(TagName)
    {
      var s = document.getElementsByTagName(TagName);
      for(var i=0, n=s.length; i<n; i++)
      {
        s[i].style.visibility=s[i].getAttribute("att_MzLockWindow_v");
        s[i].removeAttribute("att_MzLockWindow_v");
      }
    };
    function _hide(TagName)
    {
      var s = document.getElementsByTagName(TagName);
      for(var i=0, n=s.length; i<n; i++)
      {
        s[i].setAttribute("att_MzLockWindow_v", s[i].style.visibility, 0);
        s[i].style.visibility = "hidden";
      }
    };
    function UnlockWindow(obj){
    if (obj){
    document.body.removeChild(obj);
    _show("SELECT");
    _show("OBJECT");
    _show("IFRAME");
       document.getElementById("Layer1").style.visibility="hidden";
    }
    }
    //-->
    </script>
    </head><body>
    <form name="form1" method="post" action="">
      <p>
        <select name="select">
          <option value="222" selected>1111</option>
          <option value="3333">2222</option>
        </select> 
      afds</p><iframe src="b.htm"></iframe>
      <p>bdsfs</p>
      <p>ea</p>
      <div id="Layer1" style="position:absolute; width:300px; height:115px; z-index:10001; left: 50px; top: 87px; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000; visibility: hidden;">
        <input type="button" name="Submit" value="unlock" onClick="UnlockWindow(lwindow);">
      </div>
      <p>r</p>
      <p>afewfa</p>
      <p>
        <input type="button" name="Submit" value="lock" onClick="lwindow=LockWindow();">
    </p>
    <div id="Layer2" style="position:absolute; width:200px; height:115px; z-index:1; left: 250px; top: 73px; background-color: #FF0000; layer-background-color: #FF0000; border: 1px none #000000;"></div>
    </form>
    </body>
    </html>
      

  4.   

    <HTML><HEAD>
    <META content="MSHTML 6.00.2800.1586" name=GENERATOR></HEAD>
    <BODY><INPUT onclick="sAlert('测试效果<br>还可以直接书写HTML代码 <br>&copy; 2006');" type=button value=点击这里>
    <SCRIPT language=javascript type=text/javascript>
    //Author:Daviv
    //Blog:<a href="<a href="http://blog.163.com/jxdawei" target="_blank">http://blog.163.com/jxdawei</a>" target="_blank"><a href="http://blog.163.com/jxdawei" target="_blank">http://blog.163.com/jxdawei</a></a>
    //Date:2006-10-28
    //Email:[email protected]
                function sAlert(str){
                var msgw,msgh,bordercolor;
                msgw=400;//提示窗口的宽度
                msgh=100;//提示窗口的高度
                bordercolor="#336699";//提示窗口的边框颜色
                titlecolor="#99CCFF";//提示窗口的标题颜色
                
                var sWidth,sHeight;
                sWidth=document.body.offsetWidth;
                sHeight=document.body.offsetHeight;
                
                var bgObj=document.createElement("div");
                bgObj.setAttribute('id','bgDiv');
                bgObj.style.position="absolute";
                bgObj.style.top="0";
                bgObj.style.background="#777";
                bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
                bgObj.style.opacity="0.6";
                bgObj.style.left="0";
                bgObj.style.width=sWidth + "px";
                bgObj.style.height=sHeight + "px";
                document.body.appendChild(bgObj);
                var msgObj=document.createElement("div")
                msgObj.setAttribute("id","msgDiv");
                msgObj.setAttribute("align","center");
                msgObj.style.position="absolute";
                msgObj.style.background="white";
                msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
                msgObj.style.border="1px solid " + bordercolor;
                msgObj.style.width=msgw + "px";
                msgObj.style.height=msgh + "px";
              msgObj.style.top=(document.documentElement.scrollTop + (sHeight-msgh)/2) + "px";
              msgObj.style.left=(sWidth-msgw)/2 + "px";
              var title=document.createElement("h4");
              title.setAttribute("id","msgTitle");
              title.setAttribute("align","right");
              title.style.margin="0";
              title.style.padding="3px";
              title.style.background=bordercolor;
              title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);";
              title.style.opacity="0.75";
              title.style.border="1px solid " + bordercolor;
              title.style.height="18px";
              title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif";
              title.style.color="white";
              title.style.cursor="pointer";
              title.innerHTML="关闭";
              title.onclick=function(){
                document.body.removeChild(bgObj);
            document.getElementById("msgDiv").removeChild(title);
            document.body.removeChild(msgObj);
            }
              document.body.appendChild(msgObj);
              document.getElementById("msgDiv").appendChild(title);
              var txt=document.createElement("p");
              txt.style.margin="1em 0"
              txt.setAttribute("id","msgTxt");
              txt.innerHTML=str;
          document.getElementById("msgDiv").appendChild(txt);
          }
            </SCRIPT>
     </BODY></HTML>