Full version: jsB@nk » Utility » Counter-Limitation » Numeric TextBox script
URL: https://www.javascriptbank.com/numeric-textbox-script.html
This Script can be used to validate your form for numeric values. The Numeric TextBox allows only numbers and accepts one decimal Point. Compatible with both Netscape and Internet Explorer.
Full version: jsB@nk » Utility » Counter-Limitation » Numeric TextBox script
URL: https://www.javascriptbank.com/numeric-textbox-script.html
<SCRIPT language=Javascript>function keyCheck(eventObj, obj){var keyCode// Check For Browser Typeif (document.all){ keyCode=eventObj.keyCode}else{keyCode=eventObj.which}var str=obj.valueif(keyCode==46){ if (str.indexOf(".")>0){return false}}if((keyCode<48 || keyCode >58) && (keyCode != 46)){ // Allow only integers and decimal pointsreturn false}return true}</SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<FORM><CENTER>Enter the Number : <INPUT onkeypress="return keyCheck(event, this)" size="20"> </FORM><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->