method One:<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">"http://www.w3.org/1999/xhtml">"Content-type"Content="text/html; Charset=utf-8"/><title> Input lowercase letters are automatically converted into uppercase code </title><script type="Text/javascript">function $ (strid) {returndocument.getElementById (Strid);} Window.onload=function () {vardgseo=$ ("txt1");d Gseo.onkeydown=function (e) {varevt=e| | Window.Event;varnkeycode=evt.keycode| |Evt.which;varsinput=Dgseo.value;if(nkeycode>= $&& nkeycode<= -) {Dgseo.value=sinput+String.fromCharCode (nkeycode);return false;}Else{return true;}}}</script>"text"Id="txt1"Value=""/></body>Method Two:<input type="text"Id="Seo2"Value=""style="Text-transform:uppercase"/>All Two of these methods have been tested and have no problem.
Java_js_method code instance with input lowercase letters automatically converted to uppercase