Convert to uppercase as user types using javascript

后端 未结 12 1575
清酒与你
清酒与你 2020-12-13 17:59

I want to convert lowercase chars to uppercase as the user types using javascript. Any suggestions are welcome.

I have tried the following:

$(\"#text         


        
12条回答
  •  情话喂你
    2020-12-13 18:44

    $(document).ready(function () {
            $("#textbox").keyup( function (e) {
                var str = $(this).val();
                $("#textbox").val(str.toUpperCase());
    });
    });
    

提交回复
热议问题