We can create numeric textbox using JavaScript,
below code will create numeric text using JavaScript.
<script language="javascript" type="text/javascript">
//Numeric textbox
function
isNumberKey(evt) {
var
charCode = (evt.which) ? evt.which : event.keyCode
if
(charCode > 31 && (charCode < 48 || charCode > 57))
return
false;
return true;
}
</script>
<input type="text" runat="server" onkeypress="return isNumberKey(event)" id="txtNumeric"/>
I
hope this article will be very helpful to all. Thanks for reading this article.
“Keep reading and share the knowledge”
“Grow more trees to save
Earth”
No comments:
Post a Comment