Basic JavaScript Examples

Example #1

The following date is written using JavaScript code; based on the file last modified date.

Example #2

Click on the following paragraph to change the background color.

This is an important paragraph.

Example #3

Click on each "Display" button to show the hidden paragraphs.

Example #4

Click on the "Modify" button to alter the URL used in the following link.

Google

Example #5

The following link will open a pop-up window.

Pop-up window

Back