{"id":934,"date":"2014-10-06T09:45:23","date_gmt":"2014-10-06T09:45:23","guid":{"rendered":"http:\/\/javascript-tutor.net\/?p=934"},"modified":"2015-05-07T13:04:59","modified_gmt":"2015-05-07T13:04:59","slug":"documet-object-and-its-methods-and-properties","status":"publish","type":"post","link":"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/","title":{"rendered":"Document Object and its Methods and Properties"},"content":{"rendered":"<p>JavaScript uses <strong>objects<\/strong> and <strong>methods<\/strong> to display output on a webpage. One of the most commonly used objects is document. The document object uses the write method to create new content on a webpage. Method is also known as a member of the document object. To access the write method, we use a dot to link the document object with its write method, as follows:<br \/>\n                     <strong>document.write(&#8216;text&#8217;);<\/strong><\/p>\n<p>Besides methods, the document object also has properties. One of the properties is bgcolor that determines the background colour of a webpage. The syntax to access the properties is the same as the syntax to access the method. <\/p>\n<p>For example,<\/p>\n<p>         document.bgColor = \u201ccyan\u201d;<br \/>\nproduces a webpage with cyan background.<\/p>\n<p><a href=\"http:\/\/javascript-tutor.net\/index.php\/lesson-12-objects-part-4-document-object\/\">Read more here&#8230;&#8230;&#8230;&#8230;&#8230;  <\/a>     <\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript uses objects and methods to display output on a webpage. One of the most commonly used objects is document. The document object uses the write method to create new content on a webpage. Method is also known as a member of the document object. To access the write method, we use a dot to &hellip; <a href=\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Document Object and its Methods and Properties&#8221;<\/span><\/a><\/p>\n","protected":false},"author":35895,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-934","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Documet Object and its Methods and Properties - javascript tutorial<\/title>\n<meta name=\"description\" content=\"This article discuss the document object and its methods as well as properties\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Documet Object and its Methods and Properties - javascript tutorial\" \/>\n<meta property=\"og:description\" content=\"This article discuss the document object and its methods as well as properties\" \/>\n<meta property=\"og:url\" content=\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn JavaScript Online | Free Interactive JavaScript Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-06T09:45:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-05-07T13:04:59+00:00\" \/>\n<meta name=\"author\" content=\"Liew Voon Kiong\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Liew Voon Kiong\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/\",\"url\":\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/\",\"name\":\"Documet Object and its Methods and Properties - javascript tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/javascript-tutor.net\/#website\"},\"datePublished\":\"2014-10-06T09:45:23+00:00\",\"dateModified\":\"2015-05-07T13:04:59+00:00\",\"author\":{\"@id\":\"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8\"},\"description\":\"This article discuss the document object and its methods as well as properties\",\"breadcrumb\":{\"@id\":\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/javascript-tutor.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Document Object and its Methods and Properties\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/javascript-tutor.net\/#website\",\"url\":\"https:\/\/javascript-tutor.net\/\",\"name\":\"Learn JavaScript Online | Free Interactive JavaScript Tutorials\",\"description\":\"Master JavaScript with free, interactive tutorials for beginners and experienced coders. Practice live coding and visualize how JavaScript works step by step.\",\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8\",\"name\":\"Liew Voon Kiong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/javascript-tutor.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g\",\"caption\":\"Liew Voon Kiong\"},\"url\":\"https:\/\/javascript-tutor.net\/index.php\/author\/ajt7051jct\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Documet Object and its Methods and Properties - javascript tutorial","description":"This article discuss the document object and its methods as well as properties","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/","og_locale":"en_US","og_type":"article","og_title":"Documet Object and its Methods and Properties - javascript tutorial","og_description":"This article discuss the document object and its methods as well as properties","og_url":"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/","og_site_name":"Learn JavaScript Online | Free Interactive JavaScript Tutorials","article_published_time":"2014-10-06T09:45:23+00:00","article_modified_time":"2015-05-07T13:04:59+00:00","author":"Liew Voon Kiong","twitter_misc":{"Written by":"Liew Voon Kiong","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/","url":"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/","name":"Documet Object and its Methods and Properties - javascript tutorial","isPartOf":{"@id":"https:\/\/javascript-tutor.net\/#website"},"datePublished":"2014-10-06T09:45:23+00:00","dateModified":"2015-05-07T13:04:59+00:00","author":{"@id":"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8"},"description":"This article discuss the document object and its methods as well as properties","breadcrumb":{"@id":"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/javascript-tutor.net\/index.php\/2014\/10\/06\/documet-object-and-its-methods-and-properties\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/javascript-tutor.net\/"},{"@type":"ListItem","position":2,"name":"Document Object and its Methods and Properties"}]},{"@type":"WebSite","@id":"https:\/\/javascript-tutor.net\/#website","url":"https:\/\/javascript-tutor.net\/","name":"Learn JavaScript Online | Free Interactive JavaScript Tutorials","description":"Master JavaScript with free, interactive tutorials for beginners and experienced coders. Practice live coding and visualize how JavaScript works step by step.","inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8","name":"Liew Voon Kiong","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/javascript-tutor.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g","caption":"Liew Voon Kiong"},"url":"https:\/\/javascript-tutor.net\/index.php\/author\/ajt7051jct\/"}]}},"_links":{"self":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts\/934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/users\/35895"}],"replies":[{"embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/comments?post=934"}],"version-history":[{"count":4,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts\/934\/revisions"}],"predecessor-version":[{"id":1015,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts\/934\/revisions\/1015"}],"wp:attachment":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/media?parent=934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/categories?post=934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/tags?post=934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}