本人初次使用层,不清楚该怎么写。
要实现的功能是:进入页面就弹出一个层,填写姓名的信息,一个按狃,连接到另一个页面(也在层中显示)
请问应该怎么写啊?(语言是ASP)请各位帮帮忙啊!

解决方案 »

  1.   

    jquery + jqModal
    http://dev.iceburg.net/jquery/jqModal/
      

  2.   

    参考一下:http://www.easyui.org.cn/easydraglayer.html
      

  3.   


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
    <head>
    <script>
    var cover =mydiv= null;
    window.onload = function() {
      cover=document.getElementById('coverdiv');
      cover.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px";
      cover.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px"
      cover.style.display = "none";  mydiv = document.getElementById('mydiv');
      with (mydiv){
        style.width = document.documentElement.scrollHeight/2+"px";
        style.height = document.documentElement.scrollHeight/2+"px";
        style.left = (document.documentElement.scrollWidth - mydiv.offsetWidth)/2+"px";
        style.top = (document.documentElement.scrollHeight - mydiv.offsetHeight)/2+"px";
        style.display =cover.style.display = '';
       
      }
    };
    </script>
    </head>
    <BODY>
    <div id='coverdiv' style="filter:alpha(opacity=80);Opacity:0.8; background-color:#aaaaaa; position:absolute; left:0px; top:0px;"> </div>
    <!--弹出登陆窗口-->
    <div id='mydiv' style="border:1px solid #666666 ; padding:50px; position:absolute; background-color:#FFEE00">
    姓名:<input type=text id=nickname name=nickname size=10 /><br><br><br>
    <input type="button" value="转到下页面" onclick="javacript:location.href='test.htm'" />
    </div></BODY> </HTML>
      

  4.   


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
    <head>
    <script>
    var cover =mydiv= null;
    window.onload = function() {
      cover=document.getElementById('coverdiv');
      cover.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px";
      cover.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px"
      cover.style.display = "none";  mydiv = document.getElementById('mydiv');
      with (mydiv){
        style.width = document.documentElement.scrollHeight/2+"px";
        style.height = document.documentElement.scrollHeight/2+"px";
        style.left = (document.documentElement.scrollWidth - mydiv.offsetWidth)/2+"px";
        style.top = (document.documentElement.scrollHeight - mydiv.offsetHeight)/2+"px";
        style.display =cover.style.display = '';
       
      }
    };
    </script>
    </head>
    <BODY>
    <div id='coverdiv' style="filter:alpha(opacity=80);Opacity:0.8; background-color:#aaaaaa; position:absolute;left:0px;top:0px;"> </div>
    <!--弹出登陆窗口-->
    <div id='mydiv' style="border:1px solid #666666 ; padding:50px; position:absolute; background-color:#FFEE00">
    姓名:<input type=text id=nickname name=nickname size=10 /><br><br><br>
    <input type="button" value="转到下页面" onclick="javacript:location.href='test.htm'" />
    </div></BODY> </HTML>