Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
rajk<input id="user" value="karen" class="aa" type="input"> 
 
window.onload = function () {
  //  var input = document.getElementById("ff.aa");
    $(".aa").onkeypress = function () {
        // So that things work both on Firefox and Internet Explorer.
        var evt = arguments[0] || event;
        var char = String.fromCharCode(evt.which || evt.keyCode);
        // Is it a lowercase character?
        if (/[a-z]/.test(char)) {
            // Append its uppercase version
            input.value += char.toUpperCase();
            // Cancel the original event
            evt.cancelBubble = true;
            return false;
        }
    };
};
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers