diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:51:05 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:51:05 +0100 |
commit | c058fa0fb22dc40ef0225b21a97578cddd0aaffa (patch) | |
tree | df20f8b4c724b61cb9c34cdb450a7ac77d690bd0 /files/ru/orphaned/mdn/structures | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-c058fa0fb22dc40ef0225b21a97578cddd0aaffa.tar.gz translated-content-c058fa0fb22dc40ef0225b21a97578cddd0aaffa.tar.bz2 translated-content-c058fa0fb22dc40ef0225b21a97578cddd0aaffa.zip |
unslug ru: move
Diffstat (limited to 'files/ru/orphaned/mdn/structures')
-rw-r--r-- | files/ru/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/files/ru/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html b/files/ru/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html new file mode 100644 index 0000000000..393a20bc94 --- /dev/null +++ b/files/ru/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html @@ -0,0 +1,37 @@ +--- +title: A simple demo of a live code sample +slug: MDN/Structures/Live_samples/Simple_live_sample_demo +tags: + - MDN Meta + - Конструкции + - Пример +translation_of: MDN/Structures/Live_samples/Simple_live_sample_demo +--- +<div>{{MDNSidebar}}</div> + +<h2 id="Пример">Пример</h2> + +<p id="Simple_example_of_a_live_demo">Это очень простой пример показывающий вам, как сделать живой образец на MDN. Для большей информации смотрите <a href="/en-US/docs/MDN/Contribute/Structures/Live_samples">Live samples</a>.</p> + +<pre class="brush: html notranslate"><form> + <label>Try me<input type="text" name="name"></label> + <input type="submit" value="go"> +</form></pre> + +<pre class="brush: css notranslate">form { + border-radius: 10px; + background: powderblue; +}</pre> + +<pre class="brush: js notranslate">var f = document.querySelector('form'); + +f.addEventListener('submit', function(ev) { + ev.preventDefault(); + document.querySelectorAll('input')[1].value = 'sending'; +}, false);</pre> + +<p>{{ EmbedLiveSample('Пример', '', '', '') }}</p> + +<div class="blockIndicator note"> +<p>Примечание: На локализованных страницах значение первого параметра должно совпадать с ID заголовка в котором находится пример.</p> +</div> |