可能重复:
Convert string to title case with javascript
With jQuery, how do I capitalize the first letter of a text field while the user is still editing that field?
我需要jQuery或Javascript等同于PHP函数:
<?php ucwords(strtolower('SOMETHING') ?> //Outputs "Something"
我在Javascript中看过.toUpperCase()
,但找不到“大写首字母”功能。