JavaScript Document

 When a web page is loaded into the browser, it will automatically create a document object model for the web page, referred to as DOM (Document Object Model). These document object models have their own unique attributes. Now that this DOM exists, We can access these properties through JavaScript to create the interactive web page effect we want.


The content of the JavaScript Document object collection is quite rich. We made a list, and then gradually added the content. This list is not a complete collection of Document objects, and we will slowly add it as we commonly use it.
  • document.title -set or query the title content of the webpage
  • document.bgColor -get or change the color of the web page background
  • document.linkColor -control the color of unclicked hyperlinks
  • document.alinkColor -controls the color of the hyperlink when the mouse moves over
  • document.vlinkColor -control the color of clicked hyperlinks
  • document.URL -Query the URL of the webpage
  • document.referrer -Query the source URL of the page
  • document.cookie -used to set or query all cookies in the document
  • document.write() -write text content to the file
  • document.getElementById() -Query the specific id value marked in the document
  • document.getElementsByName -Query the specific name value marked in the document
  • document.getElementsByTagName -Query the specific name value marked in the document

Post a Comment

0 Comments