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