见上文......
答案 0 :(得分:3)
你应该能够在window.parent中调用函数。
<script type="text/javascript">
function closeThisPopupWindow()
{
if (window.parent && window.parent.callBack)
window.parent.callBack();
window.close();
}
</script>
显然你需要将closeThisPopupWindow函数附加到你的按钮。
答案 1 :(得分:2)
尝试这样的事情:
parent.document.getElementById('btnSubmit').click();; // submit the parent form
self.close(); // close the current window
答案 2 :(得分:2)
我会按下弹出窗口的按钮
ClientScript.RegisterStartupScript(typeof(string), "auto_refreshparent", @" window.opener.location.reload(); ", true);
ClientScript.RegisterStartupScript(typeof(Page), "ThatsAllFolks", "window.close();", true);
答案 3 :(得分:0)
string windowArgs =“toolbar = no,menubar = no,location = no,width = 620,height = 500,scrollbars = yes,resizable = yes,modal = yes”; string newWindowUrl =“MarketShotPreview.aspx”; string javaScript = “\ n”+ “\ n”+ “\ n” 个; ClientScript.RegisterStartupScript(typeof(System.Web.UI.Page),“Popup”,javaScript);