This commit is contained in:
Ilya Kantor 2017-03-18 14:46:13 +03:00
parent 1f61c2ab1d
commit af0ee2a49e
66 changed files with 12263 additions and 2059 deletions

View file

@ -2,20 +2,19 @@ importance: 5
---
# Добавьте опцию к селекту
# Add an option to select
Есть селект:
There's a `<select>`:
```html
<select>
<option value="Rock">Рок</option>
<option value="Blues" selected>Блюз</option>
<select id="genres">
<option value="rock">Rock</option>
<option value="blues" selected>Blues</option>
</select>
```
При помощи JavaScript:
1. Выведите значение и текст текущей выбранной опции.
2. Добавьте опцию: `<option value="Classic">Классика</option>`.
3. Сделайте её выбранной.
Use Javascript to:
1. Show the value and the text of the selected option.
2. Add an option: `<option value="classic">Classic</option>`.
3. Make it selected.