Auto-Format GPA while typing : REVISED
I'd maybe try something like the following. What I've done is remove the string manipulation and concentrate on rounding the numbers.

function formatGPA(originalGPA) {

    var originalGPAVal = originalGPA.value;
    var gPAVal = parseFloat(originalGPAVal);

    if (gPAVal &lt; 0) {
        gPAVal = 0;
    } else if (gPAVal &gt; 4) {
        gPAVal = 4;
    }

    if (isNaN(gPAVal)) {
        // Some kind of error handling
    } else {
        originalGPA.value = gPAVal.toFixed(2);
    }

}

//&lt;!-- When executed this script [ABOVE] auto-formats a Grade Point Average (GPA) field given the element ID [END] --&gt;

document.getElementById('collegeGPA').onblur = function () {
    formatGPA(this);
};


The only problem with this is it's difficult to manipulate it as one types. Therefore I've actioned the manipulation only on blur.