diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/glossary/strict_mode | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/glossary/strict_mode')
-rw-r--r-- | files/zh-cn/glossary/strict_mode/index.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/files/zh-cn/glossary/strict_mode/index.html b/files/zh-cn/glossary/strict_mode/index.html new file mode 100644 index 0000000000..625acc4b8c --- /dev/null +++ b/files/zh-cn/glossary/strict_mode/index.html @@ -0,0 +1,19 @@ +--- +title: Strict mode(严格模式) +slug: Glossary/strict_mode +tags: + - JavaScript + - 参考 + - 术语 +translation_of: Glossary/strict_mode +--- +<p>JavaScript 的<strong>严格模式</strong>是使用受限制的 JavaScript 的一种方式,从而隐式地退出“<a href="/zh-CN/docs/Glossary/Sloppy_mode">草率模式</a>”。严格模式不仅仅是一个子集:这种模式有意地与普通情形下的代码有所区别。</p> + +<p>通过在脚本文件/函数开头添加 <code>"use strict";</code> 声明,即可启用严格模式。</p> + +<h2 id="另请参见">另请参见</h2> + +<ul> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a></li> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode">过渡到严格模式</a></li> +</ul> |