<script LANGUAGE="JavaScript">
             <!--
          function openwin() {
              window.open("Default.aspx", "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
              //写成一行
          }
            //--
</script>
这个是script,然后<a href="#" onclick="openwin()">  </a>调用openwin(),为什么不能弹出小窗口呢,却打开了新窗口呢???
另外我想从父窗口中传值给子窗口,要怎么做呢?
 <ItemTemplate>
                         
      <a href ='popup.aspx?bauthor=<%#Server.UrlEncode(Eval( "Content").ToString()) %>&id=<%#DataBinder.Eval(Container.DataItem, "Id").ToString() %>'>
        <%# get(Eval("Content"), 20)%></a>
                            
  </ItemTemplate>
这个是直接传值的,要往弹出的窗口传值怎么传呢?

解决方案 »

  1.   


    function openwin(id) {
      window.open("Default.aspx?id"+id, "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
      }
    default.aspx
    Request.QueryString["id"]
      

  2.   

    为什么不能弹出小窗口呢,却打开了新窗口呢???---> 开不开新窗口和你定义的 window.open 的第2个参数有关。
          1:如果已经有个 newwindow 了,再点击就会取代它。
          2:如果你想要每次点击都开新窗口,就定义为 '_blank'