aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/function
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/web/javascript/reference/global_objects/function
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/web/javascript/reference/global_objects/function')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/function/prototype/index.html139
1 files changed, 0 insertions, 139 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/function/prototype/index.html b/files/zh-cn/web/javascript/reference/global_objects/function/prototype/index.html
deleted file mode 100644
index a745753511..0000000000
--- a/files/zh-cn/web/javascript/reference/global_objects/function/prototype/index.html
+++ /dev/null
@@ -1,139 +0,0 @@
----
-title: Function.prototype
-slug: Web/JavaScript/Reference/Global_Objects/Function/prototype
-tags:
- - JavaScript
- - 函数
- - 原型
- - 原型属性
-translation_of: Web/JavaScript/Reference/Global_Objects/Function
-translation_of_original: Web/JavaScript/Reference/Global_Objects/Function/prototype
----
-<div>{{JSRef}}</div>
-
-<p><code><strong>Function.prototype</strong></code> 属性存储了 {{jsxref("Function")}} 的原型对象。</p>
-
-<h2 id="Description" name="Description">描述</h2>
-
-<p>{{jsxref("Function")}}<code>对象继承自 Function.prototype 属性</code><code>。因此,Function.prototype</code> 不能被修改。</p>
-
-<h2 id="属性">属性</h2>
-
-<dl>
- <dt>{{jsxref("Function.arguments")}} {{deprecated_inline()}}</dt>
- <dd>以数组形式获取传入函数的所有参数。此属性已被{{jsxref("Functions_and_function_scope/arguments", "arguments")}}替代。</dd>
- <dt><s class="obsoleteElement">{{jsxref("Function.arity")}} {{obsolete_inline() }}</s></dt>
- <dd><s class="obsoleteElement">用于指定的函数的参数的个数,但已被删除。使用{{jsxref("Function.length","length")}}属性代替。</s></dd>
- <dt>{{jsxref("Function.caller")}} {{ Non-standard_inline() }}</dt>
- <dd>获取调用函数的具体对象。</dd>
- <dt>{{jsxref("Function.length")}}</dt>
- <dd>获取函数的接收参数个数。</dd>
- <dt>{{jsxref("Function.name")}} {{ Non-standard_inline() }}</dt>
- <dd>获取函数的名称。</dd>
- <dt>{{jsxref("Function.displayName")}} {{ Non-standard_inline() }}</dt>
- <dd>获取函数的display name。</dd>
- <dt><code>Function.prototype.constructor</code></dt>
- <dd>声明函数的原型构造方法,详细请参考 {{jsxref("Object.constructor")}} 。</dd>
-</dl>
-
-<h2 id="方法">方法</h2>
-
-<dl>
- <dt>{{jsxref("Function.prototype.apply()")}}</dt>
- <dd>在一个对象的上下文中应用另一个对象的方法;参数能够以数组形式传入。</dd>
- <dt>{{jsxref("Function.prototype.bind()")}}</dt>
- <dd><span style="font-family: courier new,andale mono,monospace; line-height: 1.5;">bind()</span>方法会创建一个新函数,称为绑定函数.当调用这个绑定函数时,绑定函数会以创建它时传入 <span style="font-family: courier new,andale mono,monospace;">bind()</span>方法的第一个参数作为 <span style="font-family: courier new,andale mono,monospace;">this</span>,传入 <span style="font-family: courier new,andale mono,monospace;">bind()</span>方法的第二个以及以后的参数加上绑定函数运行时本身的参数按照顺序作为原函数的参数来调用原函数.</dd>
- <dt>{{jsxref("Function.prototype.call()")}}</dt>
- <dd>在一个对象的上下文中应用另一个对象的方法;参数能够以列表形式传入。</dd>
- <dt>{{jsxref("Function.prototype.isGenerator()")}} {{ Non-standard_inline() }}</dt>
- <dd><code>若函数对象为</code><a href="/zh-CN/docs/Web/JavaScript/Guide/Iterators_and_Generators">generator</a>,返回true,反之返回 <code>false</code>。</dd>
- <dt>{{jsxref("Function.prototype.toSource()")}} {{ Non-standard_inline() }}</dt>
- <dd>获取函数的实现源码的字符串。 覆盖了 {{jsxref("Object.prototype.toSource")}} 方法。</dd>
- <dt>{{jsxref("Function.prototype.toString()")}}</dt>
- <dd>获取函数的实现源码的字符串。覆盖了 {{jsxref("Object.prototype.toString")}} 方法。</dd>
-</dl>
-
-<h2 id="规范">规范</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">规范</th>
- <th scope="col">状态</th>
- <th scope="col">说明</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition.Implemented in JavaScript 1.1</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.3.5.2', 'Function.prototype')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-function-instances-prototype', 'Function.prototype')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="浏览器兼容性">浏览器兼容性</h2>
-
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="参考">参考</h2>
-
-<ul>
- <li>{{jsxref("Function")}}</li>
-</ul>