Iām setting up a new server, and want to support UTF-8 fully in my web application.How to have the capital letter of every word in a row? When I enter text, I want each word to have a capital letter example: input: daniel is big king output: Daniel Is Big King. I don't know what I'm missing example: input: daniel is big king output: Daniel is big king. Only the first word has a large initial letter
testfunction = () => {
var inputtext = document.getElementById('inputtext').value;
var operation = inputtext.charAt(0).toUpperCase() + inputtext.slice(1);
console.log(operation);
}
<input type="text" id='inputtext'>
<button onclick="testfunction()">
Try it
</button>