title: How to access my form values in document.ready
body: <p>I am new to javascript and have a very basic question:</p>
  
  <p>I have this in my HTML</p>
  
  <pre><code>Total Cost: &lt;input type="text" name="total" id="total" class="MyInput" /&gt;  
  </code></pre>
  
  <p>I want to assign a value to this textbox at the program startup, for that I am using <code>document.ready</code>, but its not working.</p>
  
  <pre><code>&lt;SCRIPT LANGUAGE="JavaScript"&gt;
      $(document).ready(function() {{
          $("#total").value  = "2";
      });
  </code></pre>
  
  <p>What is the correct way of doing this?</p>