Append text to element value
<p>I multiply the integer value of 3 textboxes and display the result in a 4th textbox.</p>

<p>Before the value is displayed I want to check if the value contains any decimals, like 99.95. If it doesn't then the script shall append .00 to the value (99.00).</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function () { 
    $("input:text").each(function(){ 
        $(this).blur(function () { 
            var txt1 = $('#&lt;%=TextBox1.ClientID %&gt;').val();
            var txt2 = $('#&lt;%=TextBox2.ClientID %&gt;').val();
            var txt3 = $('#&lt;%=TextBox3.ClientID %&gt;').val();
            var txt4 = $('#&lt;%=TextBox4.ClientID %&gt;'); // To display the value.
            var value = parseFloat(txt1) + parseFloat(txt2) + parseFloat(txt3);
            txt4.val(value);
        });
    });
});
&lt;/script&gt;
</code></pre>

<p>I have tried various ways like:</p>

<pre><code>if($(value).has('.').length === 0){ value.append('.00'); }
$(value).not('.').append('.00');
</code></pre>

<p>etc.</p>

<p>None of which has worked so far. I have tried any if-statement I can think of available with jQuery.</p>
