Not allow more than 5 digits after decimal. in on javascript "OnKeyUp"?
<p>I have a javascript code for textbox that will put commas on in digits like (11,23,233)</p>

<pre><code> mTextbox.Attributes.Add("OnKeyUp", "javascript:this.value=Comma(this.value);")

function Comma(Num) {

        Num += '';
        Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
        Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
        x = Num.split('.');
        x1 = x[0];
        x2 = x.length &gt; 1 ? '.' + x[1] : '';
        var rgx = /(\d+)(\d{3})/;
        while (rgx.test(x1))
            x1 = x1.replace(rgx, '$1' + ',' + '$2');
        return x1 + x2;
    } 
</code></pre>

<p>Now same here I need to restrict user to enter not morethan 5 digits after decimal (ex: </p>

<pre><code>Allow: 12,23,221.34323

Not Allow: 12,23,232.232423
</code></pre>

<p>I can change above javascript to work that?</p>
