Wednesday, September 4, 2013

keypress uppercase jquery


Jquery

$("#ctag").bind('keyup', function (e) { if (e.which >= 97 && e.which <= 122) { var newKey = e.which - 32; e.keyCode = newKey; e.charCode = newKey; } $("#ctag").val(($("#ctag").val()).toUpperCase()); });

No comments:

Post a Comment