0% found this document useful (0 votes)
6 views2 pages

JavaScript Document Object Examples

The document provides various JavaScript examples related to manipulating the Document Object, CSS, Button, Form, Option and Select Objects, Image Object, and Popup Boxes. Each section includes specific tasks such as displaying domain names, changing visibility and colors, disabling buttons, submitting forms, and handling dropdown lists. Additionally, it covers how to display different types of popup boxes like alerts, confirms, and prompts.

Uploaded by

Sajid Zeb
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

JavaScript Document Object Examples

The document provides various JavaScript examples related to manipulating the Document Object, CSS, Button, Form, Option and Select Objects, Image Object, and Popup Boxes. Each section includes specific tasks such as displaying domain names, changing visibility and colors, disabling buttons, submitting forms, and handling dropdown lists. Additionally, it covers how to display different types of popup boxes like alerts, confirms, and prompts.

Uploaded by

Sajid Zeb
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

JavaScript Examples

The Document Object


1. Display the domain name of the server that loaded the document
2. Display the full URL of a document

Examples Explained

CSS Manipulation
1. Change the visibility of an HTML element
2. Change the background color of an HTML element

Button Object
1. Disable a button

Form Object
1. Submit a form
2. Reset a form

Option and Select Objects


1. Disable and enable a dropdown list
2. Get the number of options in the dropdown list
3. Display the selected option in a dropdown list
4. Display the index of the selected option in a dropdown list

Image Object
1. Change the source of the lightbulb
Popup Boxes
1. Display an alert box
2. Display a confirm box
3. Display a prompt box

Popup Boxes
1. Display an alert box
2. Display a confirm box
3. Display a prompt box

You might also like