最佳答案
I was trying to fiddle with toLocaleLowerCase()
and toLowerCase()
methods.
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>
My questions are: