a.aspx页面中加入javascript脚本
<script type="text/javascript">
 function win()
 {
   var hdc = window.showModalDialog('b.aspx','','width=600,height=800');
   width = screen.width;
   height = screen.height;
   hdc.moveTo((width-400)/2,(height-600)/2);
 }
</script>
利用 showModalDialog 打开b.aspx
b.aspx页面中有一个asp控件按钮进行session的提取与传值
问题:之前我用 window.open 打开b.aspx按钮正常工作换了showModalDialog 以后弹出的编程了窗体但是点击按钮就弹出了b.aspx页面
这是为什么?知道的请帮忙,谢谢!

解决方案 »

  1.   

    换了showModalDialog 以后弹出的编程了窗体但是点击按钮就弹出了b.aspx页面
    ======
    这句话不明白。
      

  2.   


      function show(id)
          {
             window.showModalDialog("b.aspx?id="+id,window,"dialogWidth:500px;dialogHeight:350px; status:no;scroll:no"); 
          }
         这样
      

  3.   

    b.aspx页面中Head中
    加入
    <head runat="server">
        <title>Untitled Page</title>
    <base target="_self">
    </head>
      

  4.   

    <base target="_self"> 
    这个是关键