我想在弹出页面中选择日期或者其它参数,并返回给父页面。
我希望返回的就是保存在lable的tooltip中,我已经通过脚本成功修改了lable的tooltip的值,但在按钮事件中总是取不到修改后的值,有啥好办法吗?

解决方案 »

  1.   

    这是孟老大的:
     可以通过window.returnValue向打开对话框的窗口返回信息,当然也可以是对象。例如: test4.htm
     ===================
     <script>
      var a = window.showModalDialog("test5.htm")
      for(i=0;i<a.length;i++) alert(a[i])
     </script> test5.htm
     ===================
     <script>
     function sendTo()
     {
      var a=new Array("a","b")
      window.returnValue = a
      window.close()
     }
     </script>
     <body>
     <form>
      <input value="返回" type=button onclick="sendTo()">
     </form>
      

  2.   

    function returnparent(id,str,value){
    window.opener.document.getElementById(id).innerText=str; window.opener.document.all.LabREDate.title = value;
    self.close();
    }这是我用的返回变量的脚本,在服务器事件中调用。
    看来返回变量只能通过脚本来实现了,没有其它更好的办法了。