How to capitalized only first letter of sentence in input fields with javascript? : <p>I want to have only first letter of the sentence to be capitalized in input fields with javascript when i type something. </p>

<p>This is my website <a href="http://web.quick-truck.com/signup" rel="nofollow">link</a> where i want to use it.</p>

<p>Is there any solution for it?</p>

<p>Here is my HTML code:</p>

<pre><code>&lt;div class="form-group"&gt;
     &lt;label for="name" class="label-head"&gt;Company Name &lt;sup&gt;&lt;span
                                class="glyphicon glyphicon-asterisk red" aria-hidden="true"&gt;&lt;/span&gt;&lt;/sup&gt;&lt;/label&gt;
     &lt;input type="text" class="form-control text-box-length input-lg" id="companyname" placeholder="Enter Your Company Name" data-validation="required" maxlength="50"&gt;
&lt;/div&gt;
</code></pre>
