Js popover returns the value of of window.open

  • 2020-03-30 01:20:10
  • OfStack

Test. The PHP


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Language" content="utf-8" /> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="author" content=" The home of the script (MyZ)" /> 
<meta name="Copyright" content=" The home of the script (MyZ)" /> 
<meta name="description" content="" /> 
<meta name="keywords"content="" /> 
<link rel="icon" href="" type="image/x-icon" /> 
<link rel="shortcut icon" href="" type="image/x-icon" /> 
<link href="" rel="stylesheet" type="text/css" /> 
<title></title> 
<script type="text/javascript"> 
<!-- 
function winOpen() 
{ 
       window.open ("test2.php", "", "height=400, width=400"); 
} 
--> 
</script> 
</head> 
<body> 
<textarea id="text1" name="text1"></textarea> 
<input type="button" value="submit" name="submit" onclick="javascript:winOpen();" /> 
</body> 
</html> 
</body> 
</html> 

Test2. PHP

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Language" content="utf-8" /> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="author" content=" The home of the script (MyZ)" /> 
<meta name="Copyright" content=" The home of the script (MyZ)" /> 
<meta name="description" content="" /> 
<meta name="keywords"content="" /> 
<link rel="icon" href="" type="image/x-icon" /> 
<link rel="shortcut icon" href="" type="image/x-icon" /> 
<link href="" rel="stylesheet" type="text/css" /> 
<title></title> 
<script type="text/javascript"> 
<!-- 
function winBack() 
{ 
       if(window.opener) { 
              fWindowText1 = window.opener.document.getElementById("text1"); 
              fWindowText1.value = fWindowText1.value + "mayongzhan"; 
              window.close(); 
       } 
} 
--> 
</script> 
</head> 
<body> 
<input type="button" name="back" value="back" onclick="javascript:winBack();" /> 
</body> 
</html> 

Window. The open explanation

Window. The open (" sUrl ", "sName", "sFeature", "bReplace");

SUrl: optional. String. Specifies the URL address of the HTML document to be loaded. If no value is specified, a new window for about:blank is displayed.

SName: optional. String. Specifies the name of the open window. This name can be used for the form or the TARGET attribute of the a object. This name can also be used with the following generic name :_media:IE6.0 opens sUrl in the media panel on the left side of the browser.

_blank: open sUrl in a new window.
_parent: opens in the parent of the current framework. If the current frame has no parent frame, this parameter value is equal to _self.
_search:IE5.0 opens sUrl in the search panel on the left side of the browser.
_self:sUrl opens in the current window, overwriting the current document.
_top: open sUrl in the topmost window outside of all frames. If the current window has no frame structure, this parameter value is equal to _self.

SFeatures: optional. String. Specifies the window decoration style. Use the following values. Multiple are separated by commas. This parameter setting takes effect only when a new browser window is created. Channelmode ={yes|no|1|0} specifies whether the window should be displayed in channelmode. The default value is no.

Directories ={yes|no|1|0} specifies whether to display the links button. The default value is yes.
Fullscreen ={yes|no|1|0} specifies whether to display the window in fullscreen mode. The default value is no. Be careful with full-screen mode, which hides the title bar and menu of the browser window. If the window closing function is not provided within the page, users can use the ALT+F4 shortcut to close the window.
Height =number sets the height of the window. The minimum is 100.
Left =number sets the abscissa of the upper left corner of the window relative to the desktop. The units are pixels (px).
Width =number sets the width of the window. The minimum is 100.
Top =number sets the vertical coordinate of the upper left corner of the window relative to the desktop. The units are pixels (px).
Location ={yes|no|1|0} sets whether to display the address bar of the browser window. The default value is yes.
Menubar ={yes|no|1|0} sets whether to display the menubar of the browser window. The default value is yes.
Resizable ={yes|no|1|0} set whether the window is allowed to be changed by the user. The default value is yes.
Scrollbars ={yes|no|1|0} set whether the window can have a scrollbar. The default value is yes.
Status ={yes|no|1|0} sets whether to display the status bar of the browser window. The default value is yes.
Titlebar ={yes|no|1|0} sets whether to display the titlebar of the browser window. This parameter is ignored unless the caller is an HTML application (HTA) or a trusted dialog box. The default value is yes. Toolbar ={yes|no|1|0} sets whether to display the toolbar of the browser window. The default value is yes.
BReplace: optional. Boolean. False | true. False: a newly opened document overrides the current document in the history list. True: the newly opened document is simply added to the end of the history list.

The return value:
ONewWindow: object (Element). Returns a reference to the new window object.

Description:
Open a new window and load the HTML document specified by sUrl. By default, the new window created by this method has a default height, width, menu, toolbar, and so on. You can change their Settings using the sFeatures parameter.

When the sFeatures parameter is specified, decorations that do not appear in the list of parameter values are automatically set to no.

IE5+ allows you to control the title bar of an open window. By trusted programs like Microsoft? Opening a window in a VisualBasic or HTML application (HTA) closes the title bar. Are they trustworthy because they use Microsoft? InternetExplorer as the browser interface.

The open method of the window object is used when an event-fired function on an object within the document calls the open method. The open method of the document object is used when an event on an object within the document directly USES the open method.


Related articles: