jQuery allow only numbers and fullstop
<pre><code> &lt;script type="text/javascript"&gt;
         $(document).ready(function () {
             $(".qty").keydown(function (event) {
                 // Allow: backspace, delete, tab, escape, and enter
                 if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 ||
                     // Allow: Ctrl+A
                     (event.keyCode == 65 &amp;&amp; event.ctrlKey === true) ||
                     // Allow: home, end, left, right
                     (event.keyCode &gt;= 35 &amp;&amp; event.keyCode &lt;= 39)) {
                     // let it happen, don't do anything
                     return;
                 }
                 else {
                     // Ensure that it is a number and stop the keypress
                     if (event.shiftKey || (event.keyCode &lt; 48 || event.keyCode &gt; 57) &amp;&amp; (event.keyCode &lt; 96 || event.keyCode &gt; 105)) {
                         event.preventDefault();
                     }
                 }
             });
         });

&lt;/script&gt;
</code></pre>

<p>the above code accepts only numbers, I would like to accept numbers and fullstop(.)</p>

<p>isn't keycode for . 46?? </p>
