水木嘉华
衣带渐宽终不悔,为学消得人憔悴!

       今天大师告诉我一个从模态页面传回传而主调页面不新的代码,在这里先记一下:

      这子页面代码
      可以放在button下面,也可以放在有其他的事件下面,其实很简单!
      
      //子页面代码
   System.Text.StringBuilder builder1=new System.Text.StringBuilder();
   builder1.Append("<script>opener.document.all.bigpath.value='"+strImageL+"';window.self.close();
                                            opener.document.all.txtSize.value='"+FileLength/1024+"k';
                                            opener.document.all.txtFileType.value='"+strHZ+"';
                             </script>");

   //父页面(html代码)
onclick="window.open('../upimages.aspx?id=1','上传图片','width=390,height=190,left=0,top=0,scrollbars=1,status=1,resizable=1')"

   可以看一下呀!

posted on 2006-11-01 12:29  彭Sir  阅读(1275)  评论(1编辑  收藏  举报