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.

链接地址: http://www.djcxy.com/p/21264.html

上一篇: 想要一个javascript正则表达式来替换案例

下一篇: jQuery改变文本大小写