Articles

JavaScript exercises with solution for Basic JavaScript training course

List of java script exercises with solution for Java Basic training course.

The numbering of the exercise is indicative of the level of difficulty, from the simplest to the most complicated. If you have any comments, questions or suggestions: write to us at info @bloginnovazione.it

Exercise 1: Write an html page containing a paragraph with the sentence:

Anything that can go wrong will go wrong

with javascript trigger some events:

– onclick : set bold for the text and yellow for the background
– onmouseover : set underlined for the text and orange for the background
– onmouseout : set 16px font for the text and light blue for the background
Exercise 2: Writing an html page with four elements arranged on three lines in the center of the page (horizontally)

– in the first row two input text side by side and spaced apart
– in the second row a button with the '+' operator, when you click on the button (onclick event) you must read the two input fields of the first row, add them and write the result in the paragraph of the third row
– in the third line a paragraph

write the js code in an external file to import into the html via src to insert in the section

BlogInnovazione.it

Innovation newsletter
Don't miss the most important news on innovation. Sign up to receive them by email.

Innovation newsletter
Don't miss the most important news on innovation. Sign up to receive them by email.

Latest Articles

Innovative intervention in Augmented Reality, with an Apple viewer at the Catania Polyclinic

An ophthalmoplasty operation using the Apple Vision Pro commercial viewer was performed at the Catania Polyclinic…

May 3, 2024

The Benefits of Coloring Pages for Children - a world of magic for all ages

Developing fine motor skills through coloring prepares children for more complex skills like writing. To color…

May 2, 2024

The Future is Here: How the Shipping Industry is Revolutionizing the Global Economy

The naval sector is a true global economic power, which has navigated towards a 150 billion market...

May 1, 2024

Publishers and OpenAI sign agreements to regulate the flow of information processed by Artificial Intelligence

Last Monday, the Financial Times announced a deal with OpenAI. FT licenses its world-class journalism…

April 30 2024