Enter a decimal point in a text box

$(a).addEvents({keydown: function(k,e){if ((k.event.keyCode >= 48 && k.event.keyCode <= 57) || (k.event.keyCode >= 96 && k.event.keyCode <= 105) || k.event.keyCode == 8 || k.event.keyCode == 9 || k.event.keyCode == 37 || k.event.keyCode == 39 || k.event.keyCode == 46 || k.event.keyCode == 190) {} else {k.event.preventDefault();}if(k.target.get(value).indexOf('.') !== -1 && k.event.keyCode == 190){k.event.preventDefault();}}.bind(this)});