jQuery change text case
Possible Duplicate:
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?
I need the jQuery or Javascript equivalent to a PHP function:
<?php ucwords(strtolower('SOMETHING') ?> //Outputs "Something"
I've seen .toUpperCase()
in Javascript, but can't find a "capitalize first letter" function.
下一篇: jQuery改变文本大小写