I want this: Example: stackoverflow is helpful. => Stackoverflow is helpful.
As example show want to convert my first word first character to Upper Case. I tried the code given below which not working, not understanding what I am doing wrong please help.
<textarea autocomplete="off" cols="30" id="TextInput" name="message" oninput="myFunction()" rows="10" style="width: 100%;"></textarea>
<input id="FistWordFirstCharcterCapital" onclick="FistWordFirstCharcterCapital()" style="color: black;" type="button" value="First word first character capital!" /> </br>
</br>
<script>
function FistWordFirstCharcterCapital() {
var x = document.getElementById("TextInput").value.replace(string[0], string[0].toUpperCase());
document.getElementById("TextInput").value = x;
}
</script>