russian translate (#37544)

This commit is contained in:
JURAMOUSE
2019-12-23 10:46:49 +04:00
committed by Gregory Gubarev
parent 868fbb0726
commit 14342ac3d4

View File

@ -8,7 +8,7 @@ localeTitle: Изменить текст с помощью кнопки «Соб
## Description ## Description
<section id='description'> <section id='description'>
Когда происходит событие клика, вы можете использовать JavaScript для обновления элемента HTML. Например, когда пользователь нажимает кнопку «Получить сообщение», он меняет текст элемента с <code>message</code> класса, чтобы сказать «Вот сообщение». Это работает, добавив следующий код в событие click: <code>document.getElementsByClassName(&#39;message&#39;)[0].textContent=&quot;Here is the message&quot;;</code> Когда происходит событие клика, вы можете использовать JavaScript для обновления элемента HTML. Например, когда пользователь нажимает кнопку «Получить сообщение», она меняет текст элемента с классом <code>message</code>, чтобы сказать «Вот сообщение». Это работает, добавив следующий код в событие click: <code>document.getElementsByClassName(&#39;message&#39;)[0].textContent=&quot;Here is the message&quot;;</code>
</section> </section>
## Instructions ## Instructions
@ -21,7 +21,7 @@ localeTitle: Изменить текст с помощью кнопки «Соб
```yml ```yml
tests: tests:
- text: Your code should use the <code>document.getElementsByClassName</code> method to select the element with class <code>message</code> and set its <code>textContent</code> to the given string. - text: Ваш код должен использовать метод <code>document.getElementsByClassName</code> для выбора элемента с классом <code>message</code>и установки ему <code>textContent</code>для данной строки.
testString: assert(code.match(/document\s*\.getElementsByClassName\(\s*?('|")message\1\s*?\)\[0\]\s*\.textContent\s*?=\s*?('|")Here is the message\2/g)); testString: assert(code.match(/document\s*\.getElementsByClassName\(\s*?('|")message\1\s*?\)\[0\]\s*\.textContent\s*?=\s*?('|")Here is the message\2/g));
``` ```