aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/statements
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:07 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commit563ca0a35e98678e2b7d5f154f31f496851e8d60 (patch)
tree7c99e7e037128217eca2080df671a742076c615b /files/zh-cn/web/javascript/reference/statements
parentd7b2995cabe8d85a1827aa18bc270bdf739f3d13 (diff)
downloadtranslated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.tar.gz
translated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.tar.bz2
translated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.zip
remove code tag inside pre tag for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/statements')
-rw-r--r--files/zh-cn/web/javascript/reference/statements/break/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/statements/continue/index.html12
-rw-r--r--files/zh-cn/web/javascript/reference/statements/debugger/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/statements/do...while/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/statements/function/index.html12
5 files changed, 19 insertions, 19 deletions
diff --git a/files/zh-cn/web/javascript/reference/statements/break/index.html b/files/zh-cn/web/javascript/reference/statements/break/index.html
index c0297dbb86..a15c0bf7d9 100644
--- a/files/zh-cn/web/javascript/reference/statements/break/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/break/index.html
@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Statements/break
<p>下面的函数里有个 <code>break</code> 语句,当 <code>i</code> 为 3 时,会中止 {{jsxref("Statements/while", "while")}} 循环,然后返回 3 * <code>x</code> 的值。</p>
-<pre class="brush: js"><code class="language-js">function testBreak(x) {
+<pre class="brush: js">function testBreak(x) {
var i = 0;
while (i &lt; 6) {
@@ -44,7 +44,7 @@ translation_of: Web/JavaScript/Reference/Statements/break
}
return i * x;
-}</code></pre>
+}</pre>
<h3 id="break_in_switch_statements">break in switch statements</h3>
diff --git a/files/zh-cn/web/javascript/reference/statements/continue/index.html b/files/zh-cn/web/javascript/reference/statements/continue/index.html
index ce08e7f444..8d58c28a2b 100644
--- a/files/zh-cn/web/javascript/reference/statements/continue/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/continue/index.html
@@ -43,7 +43,7 @@ translation_of: Web/JavaScript/Reference/Statements/continue
<p>下述例子展示了一个在<code>i</code> 为 3时执行<code>continue</code> 语句的 {{jsxref("Statements/while", "while")}} 循环。因此,<code>n</code> 的值在几次迭代后分别为 1, 3, 7 和 12 .</p>
-<pre class="brush: js language-js"><code class="language-js">i = 0;
+<pre class="brush: js language-js">i = 0;
n = 0;
while (i &lt; 5) {
i++;
@@ -51,7 +51,7 @@ while (i &lt; 5) {
continue;
}
n += i;
-}</code></pre>
+}</pre>
<h3 id="使用带_label_的_continue">使用带 label 的 continue</h3>
@@ -61,7 +61,7 @@ while (i &lt; 5) {
<p>参考 {{jsxref("Statements/label", "label")}} 。</p>
-<pre class="brush: js language-js"><code class="language-js">var i = 0,
+<pre class="brush: js language-js">var i = 0,
j = 8;
checkiandj: while (i &lt; 4) {
@@ -77,11 +77,11 @@ checkiandj: while (i &lt; 4) {
}
console.log("i = " + i);
console.log("j = " + j);
-}</code></pre>
+}</pre>
<p>输出:</p>
-<pre class="brush: js language-js"><code class="language-js">"i: 0"
+<pre class="brush: js language-js">"i: 0"
// start checkj
"j: 8"
@@ -105,7 +105,7 @@ checkiandj: while (i &lt; 4) {
"i: 3"
"i = 4"
-"j = 4"</code></pre>
+"j = 4"</pre>
<h2 id="规范">规范</h2>
diff --git a/files/zh-cn/web/javascript/reference/statements/debugger/index.html b/files/zh-cn/web/javascript/reference/statements/debugger/index.html
index 0018dc056c..0f07a5b799 100644
--- a/files/zh-cn/web/javascript/reference/statements/debugger/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/debugger/index.html
@@ -19,10 +19,10 @@ translation_of: Web/JavaScript/Reference/Statements/debugger
<p>下面的例子演示了一个包含 debugger 语句的函数,当函数被调用时,会尝试调用一个可用的调试器进行调试。</p>
-<pre class="brush:js language-js"><code class="language-js">function potentiallyBuggyCode() {
+<pre class="brush:js language-js">function potentiallyBuggyCode() {
debugger;
// do potentially buggy stuff to examine, step through, etc.
-}</code></pre>
+}</pre>
<p>当 debugger 被调用时, 执行暂停在 debugger 语句的位置。就像在脚本源代码中的断点一样。</p>
diff --git a/files/zh-cn/web/javascript/reference/statements/do...while/index.html b/files/zh-cn/web/javascript/reference/statements/do...while/index.html
index 89a850f722..614ef2ad4b 100644
--- a/files/zh-cn/web/javascript/reference/statements/do...while/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/do...while/index.html
@@ -37,17 +37,17 @@ while (<em>condition</em>);
<h3 id="HTML_内容">HTML 内容</h3>
-<pre class="brush: html line-numbers language-html"><code class="language-html">&lt;div id="example"&gt;&lt;/div&gt;</code></pre>
+<pre class="brush: html line-numbers language-html">&lt;div id="example"&gt;&lt;/div&gt;</pre>
<h3 id="JavaScript_内容">JavaScript 内容</h3>
-<pre class="brush: js"><code class="language-js">var result = '';
+<pre class="brush: js">var result = '';
var i = 0;
do {
i += 1;
result += i + ' ';
} while (i &lt; 5);
-document.getElementById('example').innerHTML = result;</code></pre>
+document.getElementById('example').innerHTML = result;</pre>
<h3 id="结果">结果</h3>
diff --git a/files/zh-cn/web/javascript/reference/statements/function/index.html b/files/zh-cn/web/javascript/reference/statements/function/index.html
index be8920fca8..ef61d65141 100644
--- a/files/zh-cn/web/javascript/reference/statements/function/index.html
+++ b/files/zh-cn/web/javascript/reference/statements/function/index.html
@@ -96,23 +96,23 @@ if (true) {
<p>JavaScript 中的<strong>函数声明</strong>被提升到了<strong>函数定义</strong>。你可以在函数声明之前使用该函数:</p>
-<pre class="brush: js language-js"><code class="language-js">hoisted(); // logs "foo"
+<pre class="brush: js language-js">hoisted(); // logs "foo"
function hoisted() {
console.log('foo');
-}</code>
+}
</pre>
<div class="note">
<p>注意 :<strong>函数表达式</strong>{{jsxref("Operators/function", "function expressions")}} 不会被提升:</p>
</div>
-<pre class="brush: js language-js"><code class="language-js">notHoisted(); // TypeError: notHoisted is not a function
+<pre class="brush: js language-js">notHoisted(); // TypeError: notHoisted is not a function
var notHoisted = function() {
console.log('bar');
};
-</code></pre>
+</pre>
<h2 id="Examples" name="Examples">示例</h2>
@@ -120,9 +120,9 @@ var notHoisted = function() {
<p>下面的代码声明了一个函数,该函数返回了销售的总金额, 参数是产品a,b,c分别的销售的数量.</p>
-<pre class="brush: js language-js"><code class="language-js">function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction
+<pre class="brush: js language-js">function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction
return units_a*79 + units_b * 129 + units_c * 699;
-}</code></pre>
+}</pre>
<h2 id="规范">规范</h2>