Capitalize first character of user input in real time with JQuery

后端 未结 8 1218
-上瘾入骨i
-上瘾入骨i 2021-02-14 13:15

I am trying to auto-capitalize the first character of a textarea/input that the user inputs. The first attempt looked like this:

$(document).ready(function() {
         


        
8条回答
  •  你的背包
    2021-02-14 13:55

    This was discussed in a previous thread. How do I make the first letter of a string uppercase in JavaScript?

    You could just grab the users input after the first word is typed or really whenever you want and reset the value using the methods discussed in the link above.

提交回复
热议问题