我在尝试使用Fiddle和toLocaleLowerCase()
以及toLowerCase()
方法。
function ByLocale() {
document.getElementById("demo").innerText.toLocaleLowerCase();
}
function ByLower() {
document.getElementById("demo").innerText.toLowerCase();
}
<p>Click the button to convert the string "HELLO World!" to lowercase letters.</p>
<button onclick="ByLocale();">By Locale LowerCase</button>
<button onclick="ByLower();">By LowerCase</button>
<p id="demo">HELLO World!</p>
我的问题是:
- 什么是Locale,因为这两个函数似乎返回类似的输出?
- 这两种方法之间有什么区别?
- 为什么fiddle代码没有被执行?