mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-09 23:44:06 +08:00
26 lines
1.3 KiB
HTML
26 lines
1.3 KiB
HTML
<article id="wikiArticle">
|
|
<p></p><div class="blockIndicator nonStandard nonStandardHeader">
|
|
<p><strong><span class="icon-only-inline" title="This API has not been standardized."><i class="icon-warning-sign"> </i></span> 非标准</strong><br/>
|
|
该特性是非标准的,请尽量不要在生产环境中使用它!</p>
|
|
</div><p></p>
|
|
<h2 id="Summary" name="Summary">概述</h2>
|
|
<p>返回一个字符串,代表当前对象的源代码</p>
|
|
<h2 id="Syntax" name="Syntax">语法</h2>
|
|
<pre><code class="language-javascript"><code><var>regexObj</var>.toSource()
|
|
</code></code></pre>
|
|
<h2 id="Description" name="Description">描述</h2>
|
|
<p><code>toSource</code>方法返回值如下:</p>
|
|
<ul>
|
|
<li>对于内置的<code>RegExp</code>对象, <code>toSource</code> 如下字符串:</li>
|
|
</ul>
|
|
<pre><code class="language-javascript">function RegExp() {
|
|
[native code]
|
|
}
|
|
</code></pre>
|
|
<ul>
|
|
<li>对于一个<code>RegExp实例</code>, <code>toSource返回代表该正则的字符串.</code></li>
|
|
</ul>
|
|
<p>该方法通常由JavaScript内部隐含调用,而不会明确的出现在用户代码中.</p>
|
|
<h2 id="See_Also" name="See_Also">相关链接</h2>
|
|
<p><a href="/zh-cn/JavaScript/Reference/Global_Objects/Object/toSource" title="zh-cn/JavaScript/Reference/Global_Objects/Object/toSource">Object.prototype.toSource</a></p>
|
|
</article> |