File tree 3 files changed +106
-108
lines changed
2-ui/4-forms-controls/1-form-elements
3 files changed +106
-108
lines changed Original file line number Diff line number Diff line change 1
- The solution, step by step :
1
+ Рішення, крок за кроком :
2
2
3
3
``` html run
4
4
<select id =" genres" >
5
- <option value =" rock" >Rock </option >
6
- <option value =" blues" selected >Blues </option >
5
+ <option value =" rock" >Рок </option >
6
+ <option value =" blues" selected >Блюз </option >
7
7
</select >
8
8
9
9
<script >
@@ -12,7 +12,7 @@ The solution, step by step:
12
12
alert ( selectedOption .value );
13
13
14
14
// 2)
15
- let newOption = new Option (" Classic " , " classic" );
15
+ let newOption = new Option (" Класика " , " classic" );
16
16
genres .append (newOption);
17
17
18
18
// 3)
Original file line number Diff line number Diff line change @@ -2,21 +2,21 @@ importance: 5
2
2
3
3
---
4
4
5
- # Add an option to select
5
+ # Додайте нову опцію до елемента ` < select> `
6
6
7
- There's a ` <select> ` :
7
+ Маємо ` <select> ` :
8
8
9
9
``` html
10
10
<select id =" genres" >
11
- <option value =" rock" >Rock </option >
12
- <option value =" blues" selected >Blues </option >
11
+ <option value =" rock" >Рок </option >
12
+ <option value =" blues" selected >Блюз </option >
13
13
</select >
14
14
```
15
15
16
- Use JavaScript to :
16
+ Використовуючи JavaScript:
17
17
18
- 1 . Show the value and the text of the selected option .
19
- 2 . Add an option : ` <option value="classic">Classic </option> ` .
20
- 3 . Make it selected .
18
+ 1 . Виведіть значення та текст обраної опції .
19
+ 2 . Додайте опцію : ` <option value="classic">Класика </option> ` .
20
+ 3 . Зробіть її обраною .
21
21
22
- Note, if you've done everything right, your alert should show ` blues ` .
22
+ Зверніть увагу: якщо ви все зробили правильно, то ваше сповіщення має показати значення ` blues ` .
You can’t perform that action at this time.
0 commit comments