title: Pass input textbox value in onClick function - php
body: <p>I have a input text field. I need to pass the values entered inside the element through onClick of javascript.</p>
  
  <pre><code>&lt;form&gt;
  &lt;fieldset&gt;     
    &lt;label&gt;Common Site ID: &lt;/label&gt;&lt;span&gt;&lt;?php echo $commonsiteid ?&gt;&lt;/span&gt;&lt;br&gt;
    &lt;label&gt;Acres: &lt;/label&gt;&lt;input id="acre_value" name="acre_value" type="text" value="&lt;?php echo $acre; ?&gt;"&gt;
   &lt;/fieldset&gt;
  &lt;/form&gt;
  &lt;input type="submit" value="submit" onclick="saveValue('&lt;?php echo $_REQUEST['acre_value'] ?&gt;')"&gt;
  </code></pre>
  
  <p>I am passing the value through submit onClick, Which is going empty. How do i pass value in this onclick function.</p>