Page 139 - DCAP202_Fundamentals of Web Programming
P. 139
Fundamentals of Web Programming
Notes Document Object: The JavaScript Document object is the container for all HTML HEAD and
BODY objects associated within the HTML tags of an HTML document.
go(relPos | string): This function will accept an integer or a string.
History Object: The JavaScript History Object is property of the window object.
Location Object: The JavaScript location object is a property of the window object. It can be used
to control the web page displayed by the browser.
Navigator Objects: It Contains information about the version, mimetype and what plug-ins
users have installed of Navigator in use.
Window object: The window object, which is a top-level object in Client Side JavaScript, represents
a window or a frame (within a frameset).
10.8 Review Questions
1. What is History object function in JavaScript?
2. Write a short note on Location object properties.
3. What is document object model?
4. How do you assign object properties?
5. How do you create a new object in JavaScript?
6. What is the function of NaN?
7. What is the function of document object model?
8. Define screen object properties.
9. Discuss the methods of navigator object.
10. How to change font and color of a text element?
Answers: Self Assessment
1. top-level 2. Atob
3. setTimeout 4. Navigator objects
5. appVersion 6. javaEnabled
7. History Object 8. go(relPos | string)
9. length 10. location object
11. Hash 12. Host
13. Document object 14. bgColor
15. fgColor
10.9 Further Readings
Books Hall, 2009, Core Web Programming, 2/E, Pearson Education India.
Jon Duckett, 2011, Beginning Web Programming with HTML, XHTML and CSS, John
Wiley & Sons.
132 LOVELY PROFESSIONAL UNIVERSITY