This open() method is very useful for the programmers. Here is a case when this might be very useful.This open() method is very useful for the programmers. Here is a case when this might be very useful.
|window.open(URL, name, specs, replace);|
Different arguments and their meanings are as described below :
|URL||It specifies the URL of the opening page|
|name||It specifies the target attribute. It may have
|specs||Comma separated list of items which defines the different attributes for the new opening windows.|
|replace||It is a boolean value and specifies that whether to open new window by replacing the URL history link or to create new entry in history list.|
All above four arguments or parameters are optional.
Here we have created an example into which when the user clicks on the button open() method would be called. Full HTML code is as follows :
<input type="button" value="Open a new window" onClick="windowOpen();"> </body> </html>
Click on the button "Open a new window"