Numeric Validation Using JavaScript

While it may be the task of programming courses V of my professors, and one must use the numeric validation for entering numbers on the form of filling. Like it or not, for the validation must be valid, I immediately lead by working on javascript code to get a valid numeric validation. While atik ngutak javascript code, I also gugling, and finally creates numeric validation javascript is pretty good for me, scriptnya following:


To call the function above, we can call by typing in the text box that will contain the numeric. this example:



• onFocus event at the time meant the calling function, can be applied in addition to onFocus. Suppose onclic, onblur and others.
• txtharga1 is the name of the text box.
• checkDecimals is the name of his function.
• And this.form.txtharga1, teksbox name this.form.txtharga1.value is validated using the above function.

Good luck, good luck. If there are no roads or error, temen-temen can fill in the comment, not insyaAlloh bales.

0 komentar: