aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/orphaned/mdn/structures/live_samples
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 12:56:40 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 12:56:40 +0100
commit310fd066e91f454b990372ffa30e803cc8120975 (patch)
treed5d900deb656a5da18e0b60d00f0db73f3a2e88e /files/zh-cn/orphaned/mdn/structures/live_samples
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-310fd066e91f454b990372ffa30e803cc8120975.tar.gz
translated-content-310fd066e91f454b990372ffa30e803cc8120975.tar.bz2
translated-content-310fd066e91f454b990372ffa30e803cc8120975.zip
unslug zh-cn: move
Diffstat (limited to 'files/zh-cn/orphaned/mdn/structures/live_samples')
-rw-r--r--files/zh-cn/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/files/zh-cn/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html b/files/zh-cn/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html
new file mode 100644
index 0000000000..d0ca0069fb
--- /dev/null
+++ b/files/zh-cn/orphaned/mdn/structures/live_samples/simple_live_sample_demo/index.html
@@ -0,0 +1,31 @@
+---
+title: A simple demo of a live code sample
+slug: MDN/Structures/Live_samples/Simple_live_sample_demo
+translation_of: MDN/Structures/Live_samples/Simple_live_sample_demo
+---
+<div>{{MDNSidebar}}</div><h2 id="The_example">The_example</h2>
+
+<p id="Simple_example_of_a_live_demo">This is a very simple example showing you how to do a live demo in MDN. For more information, see <a href="/en-US/docs/MDN/Contribute/Structures/Live_samples">Live samples</a>.</p>
+
+<pre class="brush: html notranslate">&lt;form&gt;
+ &lt;label&gt;Try me&lt;input type="text" name="name"&gt;&lt;/label&gt;
+ &lt;input type="submit" value="go"&gt;
+&lt;/form&gt;</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('The_example', '', '', '') }}</p>
+
+<p> </p>
+
+<p> </p>