在输入中使每个单词的首字母大写 [英] make first character of each word capital in input
本文介绍了在输入中使每个单词的首字母大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何在输入区域中自动制作单词的第一个字符 目前我的代码是
I was wondering how can i automatically make first character of the word in an input area Currently my code is
Name:<input type='text' name='name' class='name' placeholder='Enter your name here'/>
推荐答案
您可以尝试以下操作:演示
You can try this: DEMO
Name:<input type='text' name='name' class='name' style="text-transform: capitalize;" placeholder='Enter your name here'/>
或在CSS的name
中添加text-transform: capitalize;
.
这篇关于在输入中使每个单词的首字母大写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文