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

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

@@ -2,7 +2,7 @@
<p></p><p></p>
<p><code><strong>propertyIsEnumerable()</strong></code> 方法返回一个布尔值,表示指定的属性是否可枚举。</p>
<h2 id="Syntax" name="Syntax">语法</h2>
<pre class="syntaxbox"><code><em>obj</em>.propertyIsEnumerable(<em>prop</em>)</code></pre>
<pre><code class="language-javascript"><code><em>obj</em>.propertyIsEnumerable(<em>prop</em>)</code></code></pre>
<h3 id="Parameters" name="Parameters">参数</h3>
<dl>
<dt><code>prop</code></dt>
@@ -17,24 +17,24 @@
<h2 id="Examples" name="Examples">例子</h2>
<h3 id="Example:_A_basic_use_of_propertyIsEnumerable" name="Example:_A_basic_use_of_propertyIsEnumerable"><code>propertyIsEnumerable</code>方法的基本用法</h3>
<p>下面的例子演示了<code>propertyIsEnumerable</code>方法在普通对象和数组上的基本用法:</p>
<pre class="brush: js">var o = {};
<pre><code class="language-javascript">var o = {};
var a = [];
o.prop = 'is enumerable';
a[0] = 'is enumerable';
o.propertyIsEnumerable('prop'); // 返回 true
a.propertyIsEnumerable(0); // 返回 true</pre>
a.propertyIsEnumerable(0); // 返回 true</code></pre>
<h3 id="Example:_User-defined_versus_built-in_objects" name="Example:_User-defined_versus_built-in_objects">用户自定义对象和引擎内置对象</h3>
<p>下面的例子演示了用户自定义对象和引擎内置对象上属性可枚举性的区别.</p>
<pre class="brush: js">var a = ['is enumerable'];
<pre><code class="language-javascript">var a = ['is enumerable'];
a.propertyIsEnumerable(0); // 返回 true
a.propertyIsEnumerable('length'); // 返回 false
Math.propertyIsEnumerable('random'); // 返回 false
this.propertyIsEnumerable('Math'); // 返回 false</pre>
this.propertyIsEnumerable('Math'); // 返回 false</code></pre>
<h3 id="Example:_Direct_versus_inherited_properties" name="Example:_Direct_versus_inherited_properties">自身属性和继承属性</h3>
<pre class="brush: js">var a = [];
<pre><code class="language-javascript">var a = [];
a.propertyIsEnumerable('constructor'); // 返回 false
function firstConstructor() {
@@ -65,7 +65,7 @@ o.propertyIsEnumerable('property'); // 返回 true
// (尽管最后两个在for-in循环中可以被循环出来)。
o.propertyIsEnumerable('prototype'); // 返回 false (根据 JS 1.8.1/FF3.6)
o.propertyIsEnumerable('constructor'); // 返回 false
o.propertyIsEnumerable('firstMethod'); // 返回 false</pre>
o.propertyIsEnumerable('firstMethod'); // 返回 false</code></pre>
<h2 id="规范">规范</h2>
<table class="standard-table">
<tbody>