Monday 25 February 2013

decimal number with two digit precision


 function fillareaandunit(id) {
            var e = document.getElementById("" + id + "");
            var regexp =^\d*\.?\d{0,2}$;
            if (!regexp.test(e.value)) {
                alert("Please enter onyl number.");
                e.value = e.value.substring(0, e.value.length - 1);
                return false;
            }

No comments:

Post a Comment

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...