Try this method below and call it from onkeypress event.
function isNumberAndDecimal(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode != 45 && (charCode != 46 || $(this).val().indexOf('.') != -1) &&
(charCode < 48 || charCode > 57))
return false;
return true;
}
<asp:TextBox ID="txtQuantity" runat="server" MaxLength="10" Width="60px" onkeypress="return isNumberAndDecimal(event);"></asp:TextBox>