Document-object properties and Common object methods

Source: Internet
Author: User

document-Object Properties and common object methods

Object Properties
Document.title//Set document title equivalent to the title tag of HTML
Document.bgcolor//Set page background color
Document.fgcolor//Set foreground (text color)
Document.linkcolor//non-clicked link color
Document.alinkcolor//Activate link (focus on this link) color
Document.vlinkcolor//Clicked link color
Document. URL//Set URL property to open another page in the same window
Document.filecreateddate//File creation date, read-only property
Document.filemodifieddate//File modification date, read-only property
document.filesize  //file size, read-only property
Document.cookie  //Set up and read out Cookie
document.charset//Set CharSet Simplified Chinese: gb2312
———————————————————————
Common object methods
document.write ()//dynamically write content to page
docume Nt.createelement (TAG)    //Create an HTML tag object
document.getelementbyid ( ID)//Get the object with the specified ID value
document.getelementsbyname (Name)  //Get an object of the specified Name value
document.body.appendchild (otag)
————————— ——————————————

 

< span class= "s2" > < Span class= "S1" > < span class= "s2" > /span>

Document-object properties and Common object methods

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.