Home >Web Front-end >JS Tutorial >Summary of various methods of Javascript pop-up windows_javascript skills
//Close, neither the parent window nor the child window will pop up a dialog box, close it directly
this.Response.Write("<script>");<br>this.Response.Write("{top.opener =null;top.close();}");<br>this.Response.Write("</script>");
//The pop-up window refreshes the current page width=200 height=200 menu. There are no menu bar, toolbar, address bar, or status bar
this.Response.Write("");
//The pop-up window refreshes the current page
this.Response.Write("");
this. Response.Write("<script>window.open('WebForm2.aspx','_blank');</script>");
//The pop-up prompt window jumps to the webform2.aspx page (in an IE window)
this.Response.Write(" ");
//Close the current child window and refresh the parent window
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;window.close();< ;/script>");<br>this.Response.Write("<script>window.opener.location.replace(window.opener.document.referrer);window.close();</script>" );
//The child window refreshes the parent window
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;</script>");
this.Response.Write("<script>window.opener.location.href='WebForm1.aspx';</script>");
//Pop-up prompt window. After confirmation, a sub-window (WebForm2.aspx) will pop up
this.Response.Write("");
//A prompt window pops up. After confirmation, refresh the parent window
this.Response.Write("<script>alert('Published successfully!');window.opener.location.href=window.opener. location.href;</script>");
//The same page pops up
//
Response.Write("parent.mainFrameBottom.location.href='yourwebform.aspx?temp=" str "';");
'newwin': Hide menu bar address bar toolbar
width=50: width
height=50: height
scrollbars=yes/n scroll bar
top=50: window distance from screen Above
left=50: The distance between the window and the left side of the screen
Example: