HTML DOM (Document Object model)
When a Web page is loaded, the browser creates a Document object model for the page.
The HTML DOM model is constructed as a tree of objects.
Windows Object Operations
- window.open ()-Open a new window
- Window.close ()-Close the current window
1.windows.open ("Part I", "second part", "Part Three", "Part IV")
The first part: Write page address URL
The second part: _blank open mode, in a new window (_blank) or in its own window
Part III: Features control the format of the open window, you can write multiple, separated by a space:
width=100 height=100 High and wide
Left=0 Top=0 left margin and top margin
Scrollbars=yes scroll bar appears
Resizable=no/yes whether the window can be resized
Menubar=yes has a menu bar
Status=no No status bar
Location=yes has address bar
2.windows.close (): Close the current window
Instance:
varnewwin=NewArray ();varI=0;functionNewopen () {Newwin[i]=window.open ("http://www.baidu.com", "_blank", "width=200 height=200 scrollbars=yes menubar=yes status=yes resizable= Yes Location=yes "); I++;}functionClosewin () { for(varj=0;j<i;j++) {newwin[j].close (); }}</script>Dom manipulation of JavaScript