title: setting the HTML textbox value based on the selected option using Javascript function. But it seems to be not working
body: <p>This is the javascript snippet which assigns the selected option value to a text box</p>
  
  <pre><code>function check() {
   document.getElementById("inp").value=document.getElementById("id").value ;
  } 
  </code></pre>
  
  <p>this is the actual html code</p>
  
  <pre><code>&lt;form&gt;
  &lt;select id="id"  onSelect="check( );"&gt;
  &lt;option&gt;&lt;/option&gt;
  &lt;option value=85.5&gt;opt1&lt;/option&gt;
  &lt;option value=95.5&gt;opt2&lt;/option&gt;
  &lt;option value=95.5&gt;opt3&lt;/option&gt;
  &lt;option value=95.5&gt;opt4&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type=text name="input" id="inp"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I Hope am done right ,but still am not able to get my solution</p>