如何仅使用Oracle Jet OJ-Input-Text在大写中显示输入字段?
我想仅在输入文本字段中的大写中显示字母。
<oj-input-text style="text-transform: uppercase;" id="text-input" placeholder="Select new Item number"
value="{{newItemNumber}}"></oj-input-text>
我尝试在元素中添加CSS“ Text-Transform:UpperCase”属性,但无效。我还将元素包裹在一个跨度中并添加了CSS属性,但没有用。我希望输入字段将所有输入字母转换为大写字母,作为用户类型。有没有办法在OJET中进行?
I want to show letters only in uppercase in input text field.
<oj-input-text style="text-transform: uppercase;" id="text-input" placeholder="Select new Item number"
value="{{newItemNumber}}"></oj-input-text>
I have tried adding css "text-transform: uppercase" property to the element but that did not work. I also wrapped the element in a span and added css property but of no use. I want the input field to convert and show all input letters to uppercase as the user types. Is there a way to do it in ojet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
谢谢您的回复。我意识到我们可以在OJ-Input-Text内部访问和编辑输入标签,并相应地执行我们的操作。按照代码解决了我的问题:
Thank you for your response. I realized that we can access and edit the input tag inside oj-input-text and perform our operations accordingly. Following code fixed my problem:
除了OP的答案之外,另一种可能性是在更改原始数据(在每个键上)更改值,例如,
它并不完美,因为有时您可以看到最后一秒钟的最后一个小写字符,但要完成工作。
Another possibility besides OP's answer is to change the value when raw data (on each key pressed) is changed, e.g.
It's not perfect as you sometimes can see the last lowercase-pressed character for a fraction of a second but does the job.