The reason for this post is due to the fact that not all major browsers support HTML input types yet.
This example limits the input to numbers.
<input onkeypress=’return event.charCode >= 48 && event.charCode<=57′>
This example limits the input to numbers, but, decimal works.
<input onkeypress=’return (event.charCode >= 48 && event.charCode<=57) || event.charCode==46′ >