//刷新Father页面

public static void RefreshFatherPage(HttpResponse Response ,bool isCloseCurPage)

{

  StringBuilder scriptString = new StringBuilder();

  scriptString.Append(¨<script language = javascript>¨);

  scriptString.Append(¨window.opener.refresh();¨);

  if (isCloseCurPage )

  {

    scriptString.Append( ¨ window.focus();¨ );

    scriptString.Append( ¨ window.opener=null;¨ );

    scriptString.Append( ¨ window.close(); ¨ );

   }

   scriptString.Append(¨</¨+¨script>¨);

    Response.Write(scriptString.ToString()); }

 

/**//* 需要在Father页面的html中添加如下脚本(在Header中):

<script language=¨javascript¨> function refresh() { this.location = this.location; } </script> */


本文转载:CSDN博客