Some common properties of javascript-dom programming

Source: Internet
Author: User
Tags browser cache

I. Common document properties
1Document.title//Set document title equivalent to the title tag of HTML2Document.bgcolor//set the page background color3Document.fgcolor//Set foreground colors (text color)4Document.linkcolor//non-clicked link color5Document.alinkcolor//color of the activation link (focus on this link)6Document.vlinkcolor//the color of the link that has been clicked7Document. Url//set the URL property to open another page in the same window8Document.filecreateddate//file build date, read-only property9Document.filemodifieddate//file modification Date, read-only propertyTenDocument.charset//set character sets Simplified Chinese: gb2312 OneDocument.filesize//file size, read-only property ADocument.cookie//set up and read out cookies
Two. Summary of common Properties and functions of history objects
1 // returns the previous URL (equivalent to the browser's Back button) 2 // returns the next URL (equivalent to the browser's forward button) 3 // returns a specific page, equivalent to clicking in the browser history
Three. Summary of common Properties and functions for location objects
1Location.href//the full URL of the currently loaded page, such as: Http://www.somewhere.com/pictures/index.htm2 3Location.portocol//the protocol used in the URL, that is, the previous part of the double slash, such as: HTTP4 5Location.host//the name of the server, such as: Www.wrox.com6 7Location.hostname//usually equals host, sometimes omitting the previous WWW8 9Location.port//The URL declares the requested port, by default, most URLs do not have port information, such as: 8080Ten  OneLocation.pathname//the part of the URL in which the host name is, such as:/pictures/index.htm A  -Location.search//The part after the question mark in the URL that executes the GET request, also called the query string, such as:? Param=xxxx -  theLocation.hash//if the URL contains #, returns the contents after the symbol, such as: #anchor1 -  -Location.assign ("http:www.baidu.com")//with Location.href, the new address will be added to the browser's history stack . -  +Location.replace ("http:www.baidu.com")//with assign (), but the new address is not added to the browser's history stack and cannot be accessed through back and forward -   +Location.reload (true|false)//Reloads the current page, false when overloaded from the browser cache, is true when overloaded from the server side, and defaults to False
Four. Summary of common Properties and functions of Navigator objects
1Navigator.appcodename//string representation of the browser code name2 3Navigator.appname//a string representation of the official browser name4 5Navigator.appversion//a string representation of the browser version information6 7Navigator.cookieenabled//returns True if cookies are enabled, false otherwise8 9Navigator.javaenabled//returns True if Java is enabled, otherwise falseTen  OneNavigator.platform//a string representation of the computer platform on which the browser resides A  -Navigator.plugins//an array of plugins installed in the browser -  theNavigator.taintenabled//returns False if the data stain is turned back true -  -Navigator.useragent//string representation of the user agent header
Five. Summary of common Properties and functions of screen objects
1 screen.width/height// screen width and height, measured in pixels 23 screen.availwidth/availheight//  Window can be used by the width and height of the screen, in pixels 45//  user represents the number of colors, most systems use 32 bit 67 Window.moveto (0,089//
six. window.open parameter explanation
1alwayslowered | yes/no | Specifies that the window is hidden after all windows2 3alwaysraised | yes/no | Specifies that the window hovers above all windows4 5depended | yes/no | Whether to close at the same time as the parent window6 7Directories | yes/no | NAV2 and 3 's catalog columns are visible8 9Height | Pixel value |Window HeightTen  Onehotkeys | yes/no | Set safe exit Hotkey in window without menu bar A  -Innerheight | Pixel value |The pixel height of the document in the window -  theInnerwidth | Pixel value |the pixel width of the document in the window -  -Location | yes/no | Whether the location bar is visible -  +MenuBar | yes/no | Whether the menu bar is visible -  +Outerheight | Pixel value |set the pixel height of the window (including the decorative border) A  atOuterwidth | Pixel value |set the pixel width of the window (including the decorative border) -  -resizable | yes/no | Whether the window size can be adjusted -  -ScreenX | Pixel value |the pixel length of the window from the left edge of the screen -  inScreenY | Pixel value |the pixel length of the window from the top edge of the screen -  toScrollBars | yes/no | Whether the window can have a scroll bar +  -TitleBar | yes/no | Whether the window title bar is visible the  *Toolbar | yes/no | Whether window toolbars are visible $ Panax NotoginsengWidth | Pixel value |the pixel width of the window -  theZ-look | yes/no | Whether the window is activated to float on top of other windows
seven. SimpleDateFormat parameters
1G: Age, BC/A.D.2 y: Year3 M: Month4 d: Date5H: Hours, 1~12, minutes in the afternoon6H: Hours, 0~237 K: Hours, from 1 to8 K: Hours, from 0 to 11, distinguish the afternoon9 m: minutesTen s: Number of seconds One S: Number of milliseconds A E: Days of the week, first day of Sunday - Z: Time zone - D: The day ordinal of a year the F: The day of the week corresponds to the number of times in the month of the first occurrence - W: The first few weeks of the year - W: The first weeks of the month of January -A: Morning/Afternoon logo +  -The number of repetitions varies, and the results are different after formatting

The above is a summary of some of the common basic properties of DOM operations

Some common properties of javascript-dom programming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.