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

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...