Note://close, parent window pops up dialog, child window closes this directly. Response.Write ("<script language=javascript>window.close ();</script>");//close, parent and child windows do not pop-up dialog box, directly close this . Response.Write ("<script>"); Response.Write ("{Top.opener =null;top.close ();}"); This. Response.Write ("</script>");//pop-up window refreshes the current page width=200 height=200 menu. The menu bar, the toolbar, the address bar, and the status bar all have this. Response.Write ("<script language=javascript>window.open (' rows.aspx ', ' newwindow ', ' width=200,height=200 ') </script> ");//pop-up window refreshes the current page this. Response.Write ("<script language=javascript>window.open (' rows.aspx ') </script>"); Response.Write ("<script>window.open (' webform2.aspx ', ' _blank ');</script>");//pop-up prompt window jumps to webform2.aspx page (In an IE window) this. Response.Write ("<script Language=javascript>alert (' registered success '); window.window.location.href= ' WebForm2.aspx '; </script> ");//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> "); Response.Write ("<script>window.Opener.location.replace (Window.opener.document.referrer); Window.close ();</script> ");//child window refreshes parent window this. Response.Write ("<script>window.opener.location.href=window.opener.location.href;</script>"); Response.Write ("<script>window.opener.location.href= ' WebForm1.aspx ';</script>");//pop-up prompt window. OK to eject the child window ( webform2.aspx) this. Response.Write ("<script language= ' JavaScript ' >alert (' published successfully! '); window.open (' webform2.aspx ') </script> ");//Popup Prompt window, OK, refresh parent window after this. Response.Write ("<script>alert" was published successfully! ');window.opener.location.href=window.opener.location.href;</script> ")//Pop up the same page <input type=" button " Value= "button" onclick= "Javascript:window.open (window.location.href)" >//response.write (" Parent.mainframebottom.location.href= ' yourwebform.aspx?temp= "+str+" '; "); < SCRIPT language= "javascript" ><!--window.open (' page.html ', ' newwindow ', ' height=100, width=400, Top=0, left =0, Toolbar=no, Menubar=no, Scrollbars=no, resizable=no,location=n o, Status=no ')//This sentenceTo write a line--></script> parameter explanation: <script language= "JavaScript" > JS script start; window.open the command to pop up a new window; ' page.html ' The filename of the pop-up window, the name of the ' NewWindow ' pop-up window (not the file name), non-mandatory, available null ' instead of; height=100 window height; width=400 window width; the top=0 window from the pixel value above the screen; left=0 window distance screen The pixel value on the left, toolbar=no whether the toolbar is displayed, yes is displayed, and Menubar,scrollbars represents the menu bar and scroll bar. Resizable=no whether the window size is allowed, yes allows, location=no whether the address bar is displayed, yes is allowed, Status=no displays the information in the status bar (usually the file is open), yes allows; </SCRIPT> JS script End ' Newwin ': Hide menu bar Address bar toolbar width=50: Width height=50: Height scrollbars=yes/no: Scroll bar top=50: Window distance from top of screen left=50: Window distance from screen to the left example: window.open (' detail.aspx?id= ' +e.item.cells[1]. text+ "', ' newwin ', ' width=750,height=600,scrollbars=yes,top=50,left=50 ');"); This. Response.Write ("<script>window.open" (' webform2.aspx ', ' ', ' toolbar=no,location=no,directories=no,status=no, Menubar=no,scrollbars=no,resizable=yes,width=750,height=470,left=80,top=40 ');</script> "); example: this. Response.Write ("<script>alert" was published successfully! ');window.opener.location.href=window.opener.location.href;</script> "); RespOnse. Write ("<script>"); Response.Write ("{Top.opener =null;top.close ();}"); This. Response.Write ("</script>"); Example: Linkcolumn1. datanavigateurlformatstring= "Javascript:varwin=window.open (' edit_usr.aspx?actid={0} ', ' Newwin ', ' width=750, Height=600,scrollbars=yes,top=50,left=50 '); Window.close () "; Response.Write ("<script>window.open" (' webform7.aspx ', ' ', ' toolbar=no,location=no,directories=no,status=no, Menubar=no,scrollbars=no,resizable=yes,width=750,height=470,left=80,top=40 ');</script> "); Popup is not related to the menu toolbar in your current window, just write a script in the page and it pops up. For example <a href=# onclick= "window.open (' xxx.aspx ', ' Window name ', ' parameters ');" >xxxxx</a> The following is a list of some pop-up window parameters, you can set your own, the parameters are separated by commas optional. String-Lists the object tables and separates them with commas. Each item has its own value, and they will be separated (for example: "Fullscreen=yes, Toolbar=yes"). The following are the various features that are supported. Channelmode = {Yes | no | 1 | 0} Whether the ladder mode is displayed in the window. The default is No. directories = {Yes | no | 1 | 0} Displays the various buttons in the window. The default is yes. fullscreen = {Yes | no | 1 | 0} whether the browser is displayed in full-screen mode. The default is No. You need to be very careful when using this feature. Because this property may hide the browser's title bar and menu, you must provide a button or other hint to help the user close the browsing window. ALT+F4 can close the window. A full-screen window must use a ladder (Channelmode) mode. Height = number Specifies the height of the window, in pixels. The minimum value is 100. left = number Specifies the distance, in pixels, of the window from the border of the box. The value must be greater than or equal to 0. Location = {Yes | no | 1 | 0} Specifies whether the address bar is displayed in the window. The default is yes. menubar = {yes | no | 1 | 0} Specifies whether the menu bar is displayed in a window. The default is yes. resizable = {Yes | no | 1 | 0} Specifies whether a handle that can be resized by the user is displayed in the window. The default is yes. scrollbars = {yes | no | 1 | 0} Specifies whether to display a horizontal or vertical scroll bar in the window. The default is yes. Status = {Yes | no | 1 | 0} Specifies whether the status bar is displayed in the window. The default is yes. titlebar = {Yes | no | 1 | 0} Specifies whether the title bar is displayed in the window. In the case of a non-invoking HTML application or a dialog box, this item is ignored. The default is yes. toolbar = {Yes | no | 1 | 0} Specifies whether the toolbar is displayed in a window, including buttons such as forward, back, stop, and so on. The default is yes. top = number Specifies the position of the top of the window, in pixels. The value must be greater than or equal to 0. width = number Specifies the width of the window, in pixels. The minimum value is 100. "1, most basic pop-up code" <script language= "JavaScript" > <!--window.open (' page.html ')--and </SCRIPT> because this is a javascripts code, so they should be placed between <script language= "JavaScript" > tags and </script>. <!--and is useful for browsers with low versions, where the code in the tags is not displayed as text in these old browsers. It's a good habit to develop. window.open (' page.html ') is used to control the popup new window page.html, if page.html is not in the same path as the main window, the path, absolute path (http://) and relative path (. /) are available. Both single and double quotes are possible, justDon't mix it up. This section of code can be added anywhere in the HTML,This article is reproduced in the Graphic Design tutorial (www.china-af.com) exclusive articles, welcome to reprint
JS Popup New Window in the 6 method