11月1日 心得笔记

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

      这子页面代码
      可以放在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')"

   可以看一下呀!

原文地址:https://www.cnblogs.com/pengli/p/546616.html