This commit is contained in:
Ilya Kantor 2017-03-20 21:44:00 +03:00
parent 5f2d199054
commit e4db23fa56
13 changed files with 42 additions and 62 deletions

View file

@ -246,7 +246,7 @@ For instance:
```js
let option = new Option("Text", "value");
// creates <option value="value">Текст</option>
// creates <option value="value">Text</option>
```
The same element selected:

View file

@ -42,7 +42,8 @@ Your email please: <input type="email" id="input">
};
*!*input.onfocus*/!* = function() {
if (this.classList.contains('invalid')) { // сбросить состояние "ошибка", если оно есть
if (this.classList.contains('invalid')) {
// remove the "error" indication, because the user wants to re-enter something
this.classList.remove('invalid');
error.innerHTML = "";
}

View file

@ -18,7 +18,7 @@ Requirements:
- When the form is shown, the focus should be inside the `<input>` for the user.
- Keys `key:Tab`/`key:Shift+Tab` should shift the focus between form fields, don't allow it to leave for other page elements.
Пример использования:
Usage example:
```js
showPrompt("Enter something<br>...smart :)", function(value) {