Document Object
Setiap dokumen HTML dimuat ke dalam jendela browser menjadi objek Dokumen.Obyek Dokumen menyediakan akses ke semua elemen HTML dalam sebuah halaman, dari dalam script.
Tip: Obyek Dokumen juga merupakan bagian dari objek Window, dan dapat diakses melalui properti window.document.
W3C: W3C Standard.
Setiap dokumen HTML dimuat ke dalam jendela browser menjadi objek Dokumen.Obyek Dokumen menyediakan akses ke semua elemen HTML dalam sebuah halaman, dari dalam script.
Tip: Obyek Dokumen juga merupakan bagian dari objek Window, dan dapat diakses melalui properti window.document.
W3C: W3C Standard.
Document Object Properties
| Property | Description | W3C |
|---|---|---|
| anchors | Returns a collection of all the anchors in the document | Yes |
| applets | Returns a collection of all the applets in the document | Yes |
| body | Returns the body element of the document | Yes |
| cookie | Returns all name/value pairs of cookies in the document | Yes |
| documentMode | Returns the mode used by the browser to render the document | No |
| domain | Returns the domain name of the server that loaded the document | Yes |
| forms | Returns a collection of all the forms in the document | Yes |
| images | Returns a collection of all the images in the document | Yes |
| lastModified | Returns the date and time the document was last modified | No |
| links | Returns a collection of all the links in the document | Yes |
| readyState | Returns the (loading) status of the document | No |
| referrer | Returns the URL of the document that loaded the current document | Yes |
| title | Sets or returns the title of the document | Yes |
| URL | Returns the full URL of the document | Yes |
Document Object Methods
| Method | Description | W3C |
|---|---|---|
| close() | Closes the output stream previously opened with document.open() | Yes |
| getElementsByName() | Accesses all elements with a specified name | Yes |
| open() | Opens an output stream to collect the output from document.write() or document.writeln() | Yes |
| write() | Writes HTML expressions or JavaScript code to a document | Yes |
| writeln() | Same as write(), but adds a newline character after each statement | Yes |
Hey, it's Smriti. Your article is a good one. I must say not everybody knows how to write blogs and make them look professional. Being a law student I always look for data points like charts, analysis in articles. Yours seems to give justice to the topic. My personal style includes a lot of graphs, numbers and informative videos. I write on
ReplyDeletewww.successmantra.com for law related exams.
Very nice article! I'm Preeti, I write for educational blogs. I make a collection of wonderful educational blogs from where I could take inspiration for writing. This article really inspires me though it is a little different from my domain but nonetheless it is a good writing. I sometime write for a education site blogs
ReplyDeletewww.clearexam.ac.in Let me know your thoughts if I could contribute to your blog too.
Wow! Such an articulate post it is! I am a fan of your writing. Being a new writer, it's always good to see inspiring posts like this. I am a management graduate and write for 12th pass students for various career options. I write for a good blog: www.clearlawentrance.com I want to write about a lot of things out there, please guide me on how I can become a good blogger.
ReplyDelete"This is a wonderful article. I can see that you have done a lot of research and your subject knowledge is good and impressive.
ReplyDeleteThis is Nitin, I also like to write for an education blog www.cleariitmedical.com - This is an online blog for students who want to prepare for India's most difficult entrance exams - IIT JEE and NEET This is a free blog and provide free study material, quiz and notes to those who can't afford to pay hefty fees of coaching institutes. I write free of cost for the good cause. I know you must be busy with your work but if you could take out some time from your busy schedule and have a look at it. I saw a good collection of articles. If you only write a few words about this blog then it can help a lot of students out there. Thanks!"