Numbers and decimals only field
http://jsfiddle.net/ecDmn/1/
// apply this to all inputs with a class name of num
jQuery(".num").keyup(function() {
var $this = jQuery(this);
$this.val($this.val().replace(/[^\d.]/g, ''));
});
// valid input: 9 , 9.0