The open () method opens a new window.
Grammar:
window.open (<url>, < window name;, < parameter string >)
Parameter description:
URL: opens the URL or path of the window. window Name: The name of the window being opened. Can be "_top", "_blank", "_selft" and so on. parameter string: sets the window parameters, separated by commas.
Parameter table:
For example: Open http://www.imooc.com website, size 300px * 200px, no menu, no toolbar, no status bar, scroll bar window:
<script type= "Text/javascript" > window.open (' http://www.imooc.com ', ' _blank ', ' width=300,height=200,menubar= No,toolbar=no, Status=no,scrollbars=yes ') </script>
Attention:
1. There are spaces between the comma and the equals sign between the parameters, the string is invalid and only the whitespace is removed to run correctly.
2. Run results consider browser compatibility issues.
1. Open a new window (window.open)