nbsp; this.location = this.location;
}
</script>
*/
#endregion2.如何刷新祖先页面中的某个frame中的page了?  RefreshFrameInAncestorPage#region RefreshFrameInAncestorPage
 /**//// <summary>
/// 刷新指定的祖先页面中的某个框架的内部页面
/// </summary>
public static void RefreshFrameInAncestorPage(HttpResponse Response ,string ancestorTitle ,string frameName ,string targetUrl ,bool isCloseCurPage)//targetPageTitle 目标页面的title
 {
StringBuilder scriptString = new StringBuilder();
scriptString.Append("<script language = javascript>");
scriptString.Append("var p = window ;");
scriptString.Append(string.Format("while(p.document.title != ''''{0}'''')" ,ancestorTitle));
scriptString.Append("{");
scriptString.Append("p = p.opener ;");
scriptString.Append("}");
scriptString.Append("p.focus();");
scriptString.Append(string.Format("p.{0}.location = ''''{1}'''';" ,frameName, targetUrl));

if (isCloseCurPage )
 {
scriptString.Append( " window.focus();" );
scriptString.Append( " window.opener=null;" );
scriptString.Append( " window.close(); " );
}

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

Response.Write(scriptString.ToString());
}
#endregion3.如何刷新本页面中的其它框架了?   上一页 [1] [2] [3] [4] [5] [6] 下一页 |