语法高亮,滚动条美化,设置页面调整

This commit is contained in:
fofolee
2019-04-19 02:41:09 +08:00
parent 1e8f76c000
commit 359d29ee0b
1590 changed files with 12328 additions and 11441 deletions

View File

@@ -4,7 +4,7 @@
<h3 id=".E4.BD.BF.E7.94.A8_JavaScript_1.8" name=".E4.BD.BF.E7.94.A8_JavaScript_1.8">使用 JavaScript 1.8</h3>
<p>为了可以在 HTML 中使用 JavaScript 1.8 的新特性,需要这样写:</p>
<pre class="eval"> &lt;script type="application/javascript;version=1.8"&gt; ... 你的代码 ... &lt;/script&gt;
</pre>
</code></pre>
<p>另一种方法(不推荐)是使用旧式的 &lt;script&gt; 属性 language把它定义为 "JavaScript1.8"。</p>
<p>在使用 <a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell" title="Cn/Introduction_to_the_JavaScript_shell">JavaScript shell</a> 、JavaScript XPCOM 组件,或者 XUL <code>&lt;script&gt;</code> 元素的时候将自动启用最新的JS版本Mozilla 1.9中的 JS1.8(<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=381031" rel="noopener" title="FIXED: make JS1.8 the default for &lt;xul:script&gt;">bug 381031</a>, <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=385159" rel="noopener" title="FIXED: Make the JS shell use the latest version">bug 385159</a>)。</p>
<p>如果需要使用新的关键字 "yield" 和 "let"你需要指定是1.7版本或者更高的版本,因为现有的代码可能会把这两个关键字用作变量名或者函数名。如果要使用的新特性没有引入任何新的关键字(例如生成器表达式),就可以不指定 JavaScript 的版本。</p>