CSS文本转换不会将大写发送到业务层 [英] CSS text-transform not sending upper case to Business Layer

查看:95
本文介绍了CSS文本转换不会将大写发送到业务层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



 < html> 
< head>
< head>
< body>
< input type =textstyle =text-transform:uppercase/>
< / body>
< / html>

我假定浏览器将大写所有输入,并且它已被转换



在我的业务层,我假设浏览器也会发送大写格式的表单数据,当我执行Post方法时。



我的问题是,当我收到我的Spring Controller的数据时,它没有大写,我需要自己执行大写。



有什么想法?

解决方案

text-transform:大写字符不会将字符串转换为大写字符,您需要在服务器端执行此操作。您可以看到,如果通过cmd-c(strg-c)复制转换后的文本并将其粘贴到文本文档中。文本将是小写。



看一看:
http://static.springsource.org/spring/docs/1.1.5/api/ org / springframework / util / StringUtils.html#capitalize%28java.lang.String%29



希望您使用Spring-Framework。

>

I created a simple markup such as this.

<html>
    <head>
    <head>
    <body>
        <input type="text" style="text-transform:uppercase" />
    </body>
</html>

I was assuming that the browser will capitalize all inputs and indeed it was transformed

In my business layer, I am assuming that browser will send the form data on Upper case format also when I perform Post Method.

My problem is, when I receive the data at my Spring Controller, its not capitalize and I need to perform the capitalization myself.

Any idea?

解决方案

text-transform:uppercase is not converting a string to uppercase you need to do that at the server side. You can see that if you copy a transformed text via cmd-c (strg-c) and paste it to a text document. The Text will be lowercase.

Take a look: http://static.springsource.org/spring/docs/1.1.5/api/org/springframework/util/StringUtils.html#capitalize%28java.lang.String%29

Hope you are using the Spring-Framework.

这篇关于CSS文本转换不会将大写发送到业务层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆