title: How to select text?
body: <p>I'm trying to do like autocomplete, when person write something in text box on key up the data show up in div below  the text box,there is ajax involved but I didn't use it here to make it simple, and no I don't want to use jquery autocmplete, what I want after the text show up in my d1"div" to select a text and put in the textbox  </p>
  
  <pre><code>function call(DIV) 
  {
    var str=["app","action","false","true"];          
    $("#d1").html(str);  
  }
  
  &lt;html&gt;
    &lt;body&gt;
      &lt;div id="dd"&gt;       
        &lt;div&gt;&lt;img src="logo.png" style="width:280px;height:160px;" /&gt;&lt;/div&gt;
        &lt;div&gt;&lt;input type="text" id="search_box" size="40" name="se" onkey="up"/&gt;&lt;/div&gt;
        &lt;div id="d1"&gt;&lt;/div&gt;
      &lt;/div&gt;  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>