mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-09 15:34:05 +08:00
110 lines
6.1 KiB
HTML
110 lines
6.1 KiB
HTML
<article id="wikiArticle">
|
||
<div></div>
|
||
<p><strong><code>toLocaleLowerCase()</code></strong>方法根据任何特定于语言环境的案例映射,返回调用字符串值转换为小写的值。</p>
|
||
<h2 id="语法">语法</h2>
|
||
<pre><code class="language-javascript"><code><var>str</var>.toLocaleLowerCase()</code></code></pre>
|
||
<h3 id="返回值">返回值</h3>
|
||
<p>根据任何特定于语言环境的案例映射,将表示调用字符串的新字符串转换为小写。</p>
|
||
<h2 id="描述">描述</h2>
|
||
<p><code>toLocaleLowerCase()方法返回调用该方法的字符串被转换成小写之后的值,转换规则根据任何本地化特定的大小写映射</code><strong><code>。</code></strong><code>toLocaleLowerCase()并不会影响字符串自身的值。在大多数情况下,该方法产生的结果和调用</code><a href="Reference/Global_Objects/String/toLowerCase" title="toLowerCase() 会将调用该方法的字符串值转为小写形式,并返回。"><code>toLowerCase()</code></a>的结果相同,但是在某些本地环境中,比如土耳其语,它的大小写映射并不遵循在Unicode中的默认的大小写映射,因此会有一个不同的结果。</p>
|
||
<h2 id="例子">例子</h2>
|
||
<h3 id="使用toLocaleLowerCase()"><code><font face="Open Sans, Arial, sans-serif">使用</font>toLocaleLowerCase()</code></h3>
|
||
<pre><code class="language-javascript">console.log('ALPHABET'.toLocaleLowerCase());
|
||
// 'alphabet'
|
||
|
||
console.log('中文简体 zh-CN || zh-Hans'.toLocaleLowerCase());
|
||
// '中文简体 zh-cn || zh-hans'
|
||
</code></pre>
|
||
<h2 id="规范">规范</h2>
|
||
<table class="standard-table">
|
||
<tbody>
|
||
<tr>
|
||
<th scope="col">规范</th>
|
||
<th scope="col">状态</th>
|
||
<th scope="col">注释</th>
|
||
</tr>
|
||
<tr>
|
||
<td><a class="external" href="https://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf" hreflang="en" lang="en" rel="noopener" title="ECMAScript 3rd Edition (ECMA-262)">ECMAScript 3rd Edition (ECMA-262)</a></td>
|
||
<td><span class="spec-Standard">Standard</span></td>
|
||
<td>
|
||
<p> </p>
|
||
<p>原始定义。在JavaScript1.2中实现。</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><a class="external" href="https://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.17" hreflang="en" lang="en" rel="noopener">ECMAScript 5.1 (ECMA-262)<br/><small lang="zh-CN">String.prototype.toLocaleLowerCase</small></a></td>
|
||
<td><span class="spec-Standard">Standard</span></td>
|
||
<td> </td>
|
||
</tr>
|
||
<tr>
|
||
<td><a class="external" href="https://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.tolocalelowercase" hreflang="en" lang="en" rel="noopener">ECMAScript 2015 (6th Edition, ECMA-262)<br/><small lang="zh-CN">String.prototype.toLocaleLowerCase</small></a></td>
|
||
<td><span class="spec-Standard">Standard</span></td>
|
||
<td> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h2 id="浏览器兼容性">浏览器兼容性</h2>
|
||
<div><div class="blockIndicator warning"><strong><a class="external" href="https://github.com/mdn/browser-compat-data" rel="noopener">We're converting our compatibility data into a machine-readable JSON format</a></strong>.
|
||
This compatibility table still uses the old format,
|
||
because we haven't yet converted the data it contains.
|
||
<strong><a class="new" href="/zh-CN/docs/MDN/Contribute/Structures/Compatibility_tables" rel="nofollow">Find out how you can help!</a></strong></div>
|
||
<div class="htab">
|
||
<a id="AutoCompatibilityTable" name="AutoCompatibilityTable"></a>
|
||
<ul>
|
||
<li class="selected"><a>Desktop</a></li>
|
||
<li><a>Mobile</a></li>
|
||
</ul>
|
||
</div></div>
|
||
<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><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></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><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<h2 id="参阅">参阅</h2>
|
||
<ul>
|
||
<li><a href="Reference/Global_Objects/String/toLocaleUpperCase" title="toLocaleUpperCase() 使用本地化(locale-specific)的大小写映射规则将输入的字符串转化成大写形式并返回结果字符串。"><code>String.prototype.toLocaleUpperCase()</code></a></li>
|
||
<li><a href="Reference/Global_Objects/String/toLowerCase" title="toLowerCase() 会将调用该方法的字符串值转为小写形式,并返回。"><code>String.prototype.toLowerCase()</code></a></li>
|
||
<li><a href="Reference/Global_Objects/String/toUpperCase" title="toUpperCase() 将调用该方法的字符串值转换为大写形式,并返回。"><code>String.prototype.toUpperCase()</code></a></li>
|
||
</ul>
|
||
</article> |