How could I force the text in the "username" text input to be lower-case regardless of what user types?(不管什么用户类型,如何强制“用户名”文本input中的文本小写?)
input
<div class="register"> <label for="username">Select username:</label> </div> <div class="registerform"> <input name="username" class="registerfont" type="text" id="username" maxlength="15" style="height:35px; width:300px"> </div>
in CSS:(在CSS中:)
form input[type="text"] { text-transform: lowercase; }
otherwise in JS:(否则在JS中:)
var text="this is my text."; var lowercase=text.toLowerCase();
2.1m questions
2.1m answers
60 comments
57.0k users