<script language="javascript"> //打开模式窗口
function open1(myid){
//设置模式窗口的一些状态值
var windowStatus = "dialogWidth:400px;dialogHeight:200px;center:1;status:no;resizable:1;help:no;edge:raised;titlebar:no;";
//在模式窗口中打开的页面
var url = "select.asp?test="+myid;
//将模式窗口返回的值临时保存
var temp = showModalDialog(url,"",windowStatus);
//将刚才保存的值赋给文本输入框returnValue
document.all.returnValue.value = temp;
}
</script>///这个是我弹出的网页,我要弹出一个div遮盖他,该如何实现?

解决方案 »

  1.   

    <html>
    <head>
        <script>
    function tableClicked(e)
    {
    //e=e?e:window.event;
    document.getElementById("ms").value=(e.srcElement?e.srcElement.innerHTML:e.target.textContent);
    document.all.Layer2.style.display='none';
    document.all.ly.style.display="none";
    }
      function locking(){   
      document.all.ly.style.display="block";   
      document.all.ly.style.width=document.body.clientWidth;   
      document.all.ly.style.height=document.body.clientHeight;   
      document.all.Layer2.style.display='block';   
      }     
        </script></head>
    <body>
     <input id="ms" type="text"/>
         <input type="button" value="查询" onclick="locking()">
        <div id="ly" style="position: absolute; top: 0px; filter: alpha(opacity=60); background-color: #777;
            z-index: 2; left: 0px; display: none;">
        </div>
        <!--浮层框架开始-->
        <div id="Layer2" align="center" style="position: absolute; z-index: 10; left: expression((document.body.offsetWidth-540)/2); top: expression((document.body.offsetHeight-170)/2);
            background-color: #fff; display: none;" >
            <table width="540" border="0" cellpadding="0" cellspacing="0" style="border: 0   solid   #e7e3e7;
                border-collapse: collapse">
    <caption>
    <div align="left" style="background-color: #73A2d6; color: #fff; padding-left: 4px; padding-top: 2px;
    font-weight: bold; font-size: 14px;" width="100%" height="20" valign="middle">
    媒体管理IP
    </div>
    </caption>
    <table width="" onclick="tableClicked(event)">
    <tbody align="left">
    <tr>
    <td>192.168.0.1</td> 
    <td>192.168.0.2</td>
    <td>192.168.0.3</td>
    <td>192.168.0.4</td>
    </tr>
    </tbody>
    </table>
            </table>
        </div>
        <!--浮层框架结束-->
    </body>
    </html>
      

  2.   

    效果不错,如果我还要 在 
    <td>上海 </td> 
    <td>湖南 </td> 
    <td>192.168.0.4 </td>单击湖南 再弹出一个页面选择 湖南省下面的市,该如何做啊?
      

  3.   

     plcc123 你要的效果,可以在加上一个事件 。
     效果还要我帮你写个吗?