i read many tutorials but i dont know how to do this, this is the input
input(type=\"text\",name=\"price\",id=\"price\"data-bind=\"text: price,valueUpdate:[\
With the help of "keydown" event we can restrict other key's in text box which should hold numeric values.
$(document).ready(function(){
$("selector").on("keydown", function (e) {
//numbers, delete, backspace, arrows
var validKeyCodes = [8, 9, 37, 38, 39, 40, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57];
if (!($.inArray(e.keyCode, validKeyCodes) >= 0))
e.preventDefault();
});
});