我们数据库中的所有数据均以全大写形式输入。当我提取该信息(即名字和姓氏)时,我希望它说“John Smith”与“JOHN SMITH”。我尝试使用text-transform:capitalize;
,但只大写第一个字母。它不会使所有其他字母小写。我也试过这个(没有成功):
<div class="profile">
<h2 style="text-transform:lowercase;"><span style="text-transform: capitalize;">Welcome _MEM_FirstName_ _MEM_LastName_,</span></h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam neque lectus, molestie quis ullamcorper ac, vesti bu lum ut elit. Donec quis lacus sem, a pharetra neque. Cras ultricies purus ac ligula lacinia ullamcorper.</p>
<p>Your Walser Rewards card is also your My SA Rewards card. While at Super America locations you can get gas discounts and earn speedy rewards too.</p>
</div>
关于如何将文本从大写转换为大写的任何想法?