BananaMaster

26.1 - switch, case, default, if, else if, else, oninput ( JS lessons )

If you forgot something — click to go to the lesson.

Task 1.

Create an input type="number", a button, and a div. When the button is clicked, if the entered number is greater than 100 — display "big", otherwise "small".

Task 2.

Create a select with colors (red, blue, green) and a div. When the select value changes, update the text color of the div.

text

Task 3.

Create an input type="text" and a div. When the user types, display the text inside the div in real time.

Task 4.

Create a select with options "dark" and "light", and a button. When clicked, change the page background: dark — black, light — white.

Task 5.

Create a select and a div. When the select value changes, display the selected value inside the div.

Task 6.

Create an input type="number", a button, and a div. If the number is greater than 10 and less than 20 — display "ok", otherwise "no".

Task 7.

Create two input type="number" and a div. In real time, update the width and height of the div based on the entered values. Maximum value — 400px.