how to use one decimal in jquery using regular expression
<p>I want use only one decimal and only number in input type.so i am using jquery but problem is he is taking more decimal?????
i want to like this:123.1245454<br>
not to 12345.12245.4554</p>

<pre><code>$('#edit-discount').keyup(function() {
        var $th = $(this);
        $th.val($th.val().replace(/[^0-9.]/g, function(str) {
            $("#req-productdis").hide();
            $("#alpha1").show();
            return '';
        }));
</code></pre>
