Web Programming
JavaScript Enhanced Web Pages
The objective of this exercise is to enhance the functionality of different
web pages by JavaScript.
Tasks
-
The articles in
news.html
are to be displayed as an accordion, i.e. the content of each article is hidden at startup and is opened or closed again by clicking on the article's title.
-
The form in
registration.html
should only be submittable if the two passwords match.
-
Convert the list of images in
gallery.html
into an image gallery such that when an image is clicked, the next image is automatically displayed.
-
By clicking the button in
quotes.html
a random quote is to be retrieved from a quote service by an AJAX request. Note, that the service is slow and faulty on purpose.
Solution