简体   繁体   English

text-transform不适用于post form submit php

[英]text-transform doesn't work with post form submit php

I have an input which I added the uppercase style for it as shown below: 我有一个输入,我为它添加了大写样式,如下所示:

style="text-transform: uppercase"

However, the text is not sent as upper via the post (after pressing the submit button) as shown below: 但是,文本不会通过帖子(按下提交按钮后)作为上部发送,如下所示:

$_POST['_mytext']

I can use the upper case function in php, but I am wondering why the post is not getting the correct uppercase for the value? 我可以在php中使用大写函数,但我想知道为什么帖子没有得到值的正确大写? Is there is anything wrong with my html? 我的HTML有什么问题吗?

Styling is purely visual. 造型纯粹是视觉的。

Here is an ultra-simple demonstration . 这是一个超简单的演示

<span style="text-transform: uppercase">test</span>

In this case, TEST is printed to screen in accordance with the styling. 在这种情况下,根据样式将TEST打印到屏幕。

However, if you inspect the element, the source code will still read test . 但是,如果检查元素,源代码仍将读取test

Furthermore... 此外...

If you run the following javascript conditionals: 如果您运行以下javascript条件:

if(document.getElementById('demo').innerHTML=='test'){
   alert('lowercase');
}
if(document.getElementById('demo').innerHTML=='TEST'){
   alert('UPPERCASE');
}

You will only see the lowercase alert. 您只会看到lowercase提示。 This is because the actual data isn't changed. 这是因为实际数据没有改变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM