title: How to get select box value with space in javascript?
body: <p>i want to get the dropdown value with space in javascript.I have used $('#loc').val() and document.getElementById("loc").value, but i got only one and three based on the below code.it is taking before space only.I want the answer like, one two and three four.</p>
  
  <pre><code>&lt;form method="post" action="" name="xxx"&gt; 
   &lt;select name="loc" id="loc"&gt; 
    &lt;option value="one two"&gt;Choice 1&lt;/option&gt; 
    &lt;option value="three four"&gt;Choice 2&lt;/option&gt; 
   &lt;/select&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>please share the answer for this? thanks in advance.</p>