Get the App
SLTechnology News&Howtos  ›  Development  › 

Basic syntax of window open parameters

Shulou Source: shulou.com Published: 2022-06-03 11:02:29 10月03日 Update

This article mainly shows you the "basic syntax of window open parameters", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn the basic syntax of window open parameters.

Window.open, a computer language, a parameter in a program, is described in detail below. The open () method can find an existing or newly created browser window. If the name parameter specifies a browser window that already exists, a reference to that window is returned. The returned window displays the document specified in URL, but the features parameter is ignored. The open () method is the only way in JavaScript to get a browser window reference by name. The name parameter is used to specify the name of the new window, which must consist of letters, numbers, and underscore characters. It can be pointed to by a tag or; tag in an HTML document. If no name parameter is specified, or if there is no window with the name specified by the name parameter, the open () method creates a new browser window.

The window.open () parameter supports the environment:

JavaScript1.0+/JScript1.0+/Nav2+/IE3 + / Opera3+Fireforx above

The basic syntax of the window.open () parameter:

Window.open (pageURL,name,parameters)

Where:

PageURL is the child window path

Name is the child window handle

Parameters is the window parameter (parameters are separated by commas)

Window.open (url,name,features,replace)

Arguments- parameter

Url

An optional string parameter that points to the URL of the document to be displayed in the new window. If the parameter is omitted, or if the parameter is an empty string, the new window does not display the document.

Name

Optional string parameter, which sets the name of the new window.

You can only create one window with the same name, and if you want to create multiple windows, the name cannot be the same.

Name cannot contain spaces.

Features

Optional string parameter, which is used to set the functionality of the new window. Because this parameter is optional, if it is not specified, the new window has all the standard features.

Replace

Optional Boolean parameter that sets how the operation history in the new window is saved.

True- creates a new history

False- replaces the old history

Return value editing

A reference to a newly created or existing window object based on the name parameter.

The above is all the content of this article "basic Syntax of window open parameters". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Parameters name syntax characters documents browsing content history strings methods articles same function pointing tagging learning help underlining lieutenant general Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Tech Info macOS MySQL Microsoft