JavaScript For Vim version 7.3 Last change: 2015 Jan 17 vim:noundofile:foldcolumn=1:filetype=help:autochdir:textwidth=70:wrap:scrolloff=20:tags=javaScriptTags: *************************************~ ** **~ ** **~ ** JavaScript Window open() Method **~ ** **~ ** **~ *************************************~ Example~ Open "www.w3schools.com" in a new browser window: > window.open("http://www.w3schools.com"); < Definition and Usage~ The open() method opens a new browser window. Tip: Use the close() method to close the window. Browser Support~ Method Chrome IE Firefox Safari Opera~ open() Yes Yes Yes Yes Yes Syntax~ > window.open (URL, name, specs, replace ) < URL~ ----- Optional. Specifies the URL of the page to open. If no URL is specified, a new window with about:blank is opened name~ ----- Optional. Specifies the target attribute or the name of the window. The following values are supported: _blank~ URL is loaded into a new window. This is default _parent~ URL is loaded into the parent frame _self~ URL replaces the current page _top~ URL replaces any framesets that may be loaded name ~ The name of the window (Note: the name does not specify the title of the new window) specs~ ----- Optional. A comma-separated list of items. The following values are supported: channelmode = yes | no| 1 | 0~ Whether or not to display the window in theater mode. Default is no. IE only directories = yes | no | 1 | 0~ Obsolete. Whether or not to add directory buttons. Default is yes. IE only fullscreen = yes | no | 1 | 0~ height = pixels~ The height of the window. Min. value is 100 left = pixels~ The left position of the window. Negative values not allowed location = yes | no | 1 | 0~ Whether or not to display the address field. Opera only menubar = yes | no | 1 | 0~ Whether or not to display the menu bar resizable = yes | no | 1 | 0 ~ Whether or not the window is resizable. IE only scrollbars = yes | no | 1 | 0~ Whether or not to display scroll bars. IE, Firefox & Opera only status = yes | no | 1 | 0~ Whether or not to add a status bar titlebar = yes | no | 1 | 0~ Whether or not to display the title bar. Ignored unless the calling application is an HTML Application or a trusted dialog box toolbar = yes | no | 1 | 0~ Whether or not to display the browser toolbar. IE and Firefox only top = pixels~ The top position of the window. Negative values not allowed width = pixels~ The width of the window. Min. value is 100 replace~ Optional. Specifies whether the URL creates a new entry or replaces the current entry in the history list. The following values are supported: true ~ URL replaces the current document in the history list false ~ URL creates a new entry in the history list *JavaScript_Style_Object* *javascript_style_object* ----------------------------------------------------------------------- *****************************~ ** **~ ** **~ ** JavaScript Style Object **~ ** **~ ** **~ *****************************~ undergoing construction works sorry for any inconvenience caused :) *JavaScript__Style_color_property* *javascript__style_color_property* ------------------------------------------------------------------------ *************************************~ ** **~ ** **~ ** JavaScript Style color Property **~ ** **~ ** **~ *************************************~ |Style_Object| Example~ Set the *text-color* for different elements: > document.getElementById("myH2").style.color = "#ff0000"; document.getElementById("myP").style.color = "magenta"; document.getElementById("myP2").style.color = "blue"; document.getElementById("myDiv").style.color = "lightblue"; Definition and Usage~ The color property sets or returns the color of the text. Browser Support~ Chrome IE Firefox Safari Opera~ The color property is supported in all major browsers. Syntax~ Return the color property: > object.style.color < Set the color property: > object.style.color=" color | initial | inherit" Property Values~ color~ Specifies the color of the text. Look at CSS Color Values for a complete list of possible color values initial~ Sets this property to its default value. Read about initial inherit~ Inherits this property from its parent element. Read about inherit Technical Details~ Default Value : not specified Return Value : A String, representing the text-color of an element CSS Version : CSS1 More Examples~ Example~ Return the text-color of a

element: > alert(document.getElementById("myP").style.color); < *HTML_DOM__Style_Object* *html_dom__style_object* ------------------------------------------------------------------------ ***************************~ ** **~ ** **~ ** HTML DOM Style Object **~ ** **~ ** **~ ***************************~ Style object~ The Style object represents an individual style statement. Access a Style Object~ The Style object can be accessed from the head section of the document, or from specific HTML element(s). Accessing style object(s) from the head section of the document: > var x = document.getElementsByTagName("STYLE"); < Accessing a specified element's style object: > var x = document.getElementById("myH1").style; < Create a Style Object~ You can create a