需求:
点击a.aspx页面获取按钮(btn_Get),弹出b.aspx窗口,b.aspx中是一个组织机构树,选择一个组织机构,点击“确定”按钮,关闭b.aspx页面,同时返回给a.aspx页面一返回值(选择组织机构ID),a.aspx页面获取返回值。
谢谢!在线等。

解决方案 »

  1.   

    可以直接用url传过来啊参数aa.aspx的Load事件
    if(!string.isnullorempty(request.params["a"]))
    {
        int id = convit.toint32(request.params["a"]);
    }
      

  2.   

    这个还是简单,给你个我写的例子。无刷新直接返回值。
    把下面代码复制到txt 然后修改后缀为 html
    --------
    <HTML> 
    <HEAD> 
    <TITLE> Window 1 </TITLE> 
    </HEAD> 
      
    <BODY> 
    <H1>Window 1</H1> 
    <INPUT TYPE="text" NAME=""><INPUT TYPE="submit"> 
      
    <script> 
    var aInput = document.getElementsByTagName("input"); 
    for (i = 0 ; i < aInput.length ; i++ ) 

    if (aInput[i].getAttribute("type") == "text") var textboxA = new Object(aInput[i]); 
    if (aInput[i].getAttribute("type") == "submit") var btnA = new Object(aInput[i]); 
    } // 这里把html里的2个标签定义出来,让行为层和结构层分离的更彻底 
      
    btnA.onclick = function() 

    window.open('b.html','newwindow','height=200,width=400') 
    } //使用window.open方法弹出窗口;此方法适用于各种浏览器 
    </script> 
    </BODY> 
    </HTML>
      

  3.   

    子页面
    把下面代码复制到txt 然后修改后缀为 html
    --------------------
    <HTML> 
    <HEAD> 
    <TITLE> New Document </TITLE> 
    </HEAD> 
      
    <BODY> 
    <H1>Window 2</H1> 
    <INPUT TYPE="text" NAME="" value="11"><INPUT TYPE="submit"> 
      
    <script> 
    var aInput = document.getElementsByTagName("input"); 
    for (i = 0 ; i < aInput.length ; i++ ) 

    if (aInput[i].getAttribute("type") == "text") var textboxB = new Object(aInput[i]); 
    if (aInput[i].getAttribute("type") == "submit") var btnB = new Object(aInput[i]); 

      
    btnB.onclick = function(){ 
    var sTextValue = textboxB.value 
    window.opener.textboxA.value = sTextValue 
    window.close(); 
    } //使用window.opener 方法获取父页面的对象,把子页面的值赋过去 
    </script> 
    </BODY> 
    </HTML>
      

  4.   

    var returnValue = window.showModalDialog("b.aspx", "", "dialogWidth=680px;dialogHeight=430px;status:no");   
    //遍历treeview获取数据
     ScriptManager.RegisterStartupScript(this, this.GetType(), "xx", "window.returnValue="+str+"; window.close();", true);
    window.open
    window.opner.document.getElementById("txt").value="";
      

  5.   

    利用 var q=window.showModelDialog() 的returnValue来获取了页面的返回值
      

  6.   

    模态窗口:
    小窗口:window.returnValue=1
    主窗口:var v=window.showModelDialog();普通窗口:
    小窗口中可以这样写,调用父窗口的处理函数:
    opener.returnFunc(1);
    主窗口定义处理函数就可以了:
    window.returnFunc=function(retValue){
      
    }我正在使用《Csdn收音机》第一时间获取最新动态!
      

  7.   

    要呢,我们可能乱说《Csdn收音机》支持全屏截图功能啦,快来看看吧!